Skip to content

Latest commit

 

History

History
25 lines (23 loc) · 652 Bytes

testing.md

File metadata and controls

25 lines (23 loc) · 652 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. Adjust .env file to set TEST_DB_DSN, TEST_DB_USER and TEST_DB_PASSWORD params
  2. 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