I need to test all classes in a range of subfolders. However, I do not want to test the other files in these subfolders until I have done a large refactoring.
The files I want to test all start with class.
, e.g. class.apis.php
, class.something.php
.
So, in order to run my tests I have the folloring configuration for PHPUnit:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true" backupStaticAttributes="true" colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true" convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false" syntaxCheck="true" verbose="true"
strict="true">
<php>
<includePath>../</includePath>
</php>
<testsuites>
<testsuite name="MSBO Test Suite">
<directory>PHPUnit</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">../classes/</directory>
<directory suffix=".php">../modules/</directory>
<exclude>
<directory>../classes/external/</directory>
</exclude>
</whitelist>
</filter>
</phpunit>
But I cannot find anything on how to add a prefix to the whitelisting. Any ideas?