Skip to content

Latest commit

 

History

History
27 lines (26 loc) · 644 Bytes

testing.md

File metadata and controls

27 lines (26 loc) · 644 Bytes

Testing

To run tests:

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