To run tests:
- Start containers:
docker-compose up -d
- Create
tests
database:
docker-compose exec db mysql -uroot -proot -e "CREATE DATABASE \`yii2-starter-kit-test\` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"
- Adjust
.env
file to setTEST_DB_DSN
,TEST_DB_USER
andTEST_DB_PASSWORD
params - Setup application:
docker-compose exec app php tests/bin/yii app/setup --interactive=0
- Start web server for acceptance tests (do not close bash session):
docker-compose exec app php -S localhost:8080
- Run tests in separate window:
docker-compose exec app vendor/bin/codecept run