This project is used as a sample on how to write tests using Codeception library for a Laravel application.
Three test suites are included: Unit / Integration / Functional
Docker should be installed. For more information: click here
docker-compose up
docker exec -ti php bash
php artisan migrate:refresh --seed
Update your host file and create an entry:
127.0.0.1 automated_testing.dev
You can now access the app by visiting: http://automated_testing.dev
Create test DB:
docker exec -ti mysql bash
mysql -uroot -proot -e 'CREATE DATABASE laravel_test;'
Test command:
docker exec -ti php bash
vendor/bin/codecept run
Test with coverage:
vendor/bin/codecept run --coverage --coverage-html