This is a fork of the "Symfony Demo Application".
Codeception has been added for browser testing.
- PHP 8.1.0 or higher;
- PDO-SQLite PHP extension enabled;
- and the usual Symfony application requirements.
The best way to install this project is with Composer, once it's installed on your computer to run these commands:
# ...clone the code repository and install its dependencies
$ git clone https://github.com/sketchings/symfony-codeception-demo.git my_project
$ cd my_project/
$ composer install
There's no need to configure anything before running the application.
On your local machine, you can run this command to use the built-in PHP web server:
$ cd my_project/
$ php -S localhost:8000 -t public/
Selenium is required to launch and control browsers from Codeception. Selenium Server is required to be installed and started before running acceptance tests.
The fastest way of getting Selenium is using selenium-standalone NodeJS Package. It automatically installs Selenium and all required dependencies and starts server. It requires NodeJS and Java to be installed.
$ npm install selenium-standalone -g
$ selenium-standalone install
Launch this command in a separate terminal:
$ selenium-standalone start
Execute this command to run all tests:
$ vendor/bin/codecept run
Or you can run individual suite, individual file, or individual test:
$ vendor/bin/codecept run functional
$ vendor/bin/codecept run functional readBlogCest.php
$ vendor/bin/codecept run functional readBlogCest.php:viewListAndLink