Yii 2 Codeception Tests
Here placed ready to work configs of unit, functional, api and acceptance test suites.
Init project: `/path/to/php-bin/php /path/to/yii-application/init --env=Development --overwrite=All` Prepare application
Install dependencies: composer install
Setup nginx:
server {
listen 80;
listen [::]:80;
root /var/www/yii-testing/frontend/web;
index index.php index-test.php;
server_name yii2testing;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Install [jre]( Acceptance tests instructionshttps://www.java.com/en/download/linux_manual.jsp).
Download and install Selenium stand-alone sever.
Download and unpack Chrome driver.
Run Selenium: java -jar -Dwebdriver.gecko.driver=./chromedriver ./selenium-server-standalone-x.x.x.jar
Run web server in the app /web folder: php -S 127.0.0.1:8080