In PHPUnit it is posible to organize the tests in different testsuites:
<phpunit bootstrap="Bootstrap.php">
<testsuites>
<testsuite name="zf2sandbox">
<directory>./AlbumTest</directory>
</testsuite>
</testsuites>
</phpunit>
Furthermore you can define filters like
<filter>
<whitelist>
<directory suffix=".php">/var/www/sandbox/zf2sandbox/module/Album/src/Album/</directory>
</whitelist>
</filter>
Now I'd like to combine these two fetaures. It's not allowed to put a filter tag into a testsuite (the filter is just ignored).
<phpunit bootstrap="Bootstrap.php">
<testsuites>
<testsuite name="zf2sandbox">
<directory>./AlbumTest</directory>
<filter>
<whitelist>
<directory suffix=".php">/var/www/sandbox/zf2sandbox/module/Album/src/Album/</directory>
</whitelist>
</filter>
</testsuite>
</testsuites>
</phpunit>
Is there another way to define filters (whilists, blacklists etc.) for each testsuite?
Did you try adding the filter inside the testsuite tag, because in your example it is in the testsuites tag. ie:
<phpunit bootstrap="Bootstrap.php">
<testsuites>
<testsuite name="zf2sandbox">
<directory>./AlbumTest</directory>
<filter>
<whitelist>
<directory suffix=".php">/var/www/sandbox/zf2sandbox/module/Album/src/Album/</directory>
</whitelist>
</filter>
</testsuite>
</testsuites>
</phpunit>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With