cp .env.example .env
docker-compose up -d
docker-compose exec php composer install
docker-compose exec php chmod -R 777 storage bootstrap/cache
docker-compose exec php php artisan key:generate
docker-compose exec php php artisan migrate
docker-compose exec php php artisan module:seed Exercise03
To prevent conflict, each exercise is organized in its own folder with the help of package Laravel-Modules, for example Modules/Exercise01
.
Start implementing and writing unit tests for each exercise.
cp .env.testing.example .env.testing
Run all:
./phpunit.sh
Run all with coverage text:
./phpunit.sh --coverage-text
Run all with coverage html:
./phpunit.sh --coverage-html=coverage
Run only one module (see testsuites in phpunit.xml
)
./phpunit.sh --coverage-html=coverage --testsuite=Exercise01
NOTE: You can edit file ./phpunit.sh
to use other phpunit code coverage driver. pcov
or phpdbg
can generate code coverage much faster than xdebug
. Please try!
Run all:
./infection.sh
Run only one module:
./infection.sh --filter=Exercise01
Run only one file:
./infection.sh --filter=Modules/Exercise01/Http/Controllers/OrderController.php