composer run-script docker:tests
To run tests:
- Start containers:
docker-compose up -d
- Create
tests
database:
docker-compose exec db mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS \`yii2-starter-kit-test\` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"
- Build needed files
docker-compose exec app ./vendor/bin/codecept build
- 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