Testing
PHPUnit
Unit testing framework.
vfsStream
Creates a virtual filesystem (useful for mocking the real one in unit tests).
Create a test database
Claroline tests suite requires a database to be performed.
Make sure you have an up-to-date DB before going further :
1
$ bin/console claroline:update --env=test
Run tests
To run the full test suite :
1
$ bin/phpunit --dont-report-useless-tests
To run a plugin test suite :
1
$ bin/phpunit src/plugin/MY_PLUGIN
Or a single test file :
1
$ bin/phpunit src/plugin/exo/Tests/Manager/Attempt/AnswerManagerTest.php