X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=doc%2FUnit-tests.md;h=0942ad382fd18f0b4f976f22fb560bb9e22c7842;hb=b230bf207df576fa2ad165702184edf21f674ce7;hp=f288878057d44e31466d77b0f1f4cc37221757c9;hpb=f501caed215bd12caced5106f9226638b2b15fb4;p=github%2Fshaarli%2FShaarli.git diff --git a/doc/Unit-tests.md b/doc/Unit-tests.md index f2888780..0942ad38 100644 --- a/doc/Unit-tests.md +++ b/doc/Unit-tests.md @@ -126,3 +126,22 @@ If Xdebug has been installed and activated, two coverage reports will be generat * a summary in the console * a detailed HTML report with metrics for tested code * to open it in a web browser: `firefox coverage/index.html &` + +### Executing specific tests +Add a [`@group`](https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.group) annotation in a test class or method comment:[](.html) + +```php +/** + * Netscape bookmark import + * @group WIP + */ +class BookmarkImportTest extends PHPUnit_Framework_TestCase +{ + [...][](.html) +} +``` + +To run all tests annotated with `@group WIP`: +```bash +$ vendor/bin/phpunit --group WIP tests/ +```