-
Notifications
You must be signed in to change notification settings - Fork 6
Unit tests
Tomasz Jędrzejewski edited this page Nov 27, 2016
·
1 revision
Unit tests can be launched with PHPUnit 5.x:
# phpunit -c
To install the database structure necessary to launch functional tests, configure the app/config/parameters.yml file (the template can be found in the same directory), and run the following command:
# php bin/console cantiga:install:db --env=test -d --type=mysql
- Unit tests shall be database-independent; if necessary, mock the database interaction,
- Unit tests shall follow the given-when-then structure and test one thing at a time,
- Functional tests should use the Symfony crawler.