From 4049d346296f26d7633912af0a813391e9c38fe1 Mon Sep 17 00:00:00 2001 From: David Coutadeur Date: Wed, 3 Jul 2024 12:01:45 +0200 Subject: [PATCH] add a section explaining how to run unit tests (#894) --- docs/developpers.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/developpers.rst b/docs/developpers.rst index 4991e487..11e1ac3a 100644 --- a/docs/developpers.rst +++ b/docs/developpers.rst @@ -140,3 +140,21 @@ Points of attention: * don't forget to declare the namespace: ``namespace captcha;`` * don't forget to write the corresponding unit tests (see tests/InternalCaptchaTest.php) + +Run unit tests +-------------- + +Run the unit tests with this command: + +``` +XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --configuration tests/phpunit.xml +``` + +Take care to use the phpunit shipped with composer. + +If you don't have the composer dependencies yet: + +``` +composer update +``` +