Description
(PHPUnit 3.7.19)
I have a phpunit.xml.dist file containing the following:
<testsuite name="ValueParsers">
<directory>/ValueParsers/tests</directory>
<exclude>/ValueParsers/tests/includes/api</exclude>
</testsuite>
This now works fine, however what I had before was
<testsuite name="ValueParsers">
<directory>ValueParsers/tests</directory>
<exclude>ValueParsers/tests/includes/api</exclude>
</testsuite>
(Note the lack of leading slashes.)
This worked when running phpunit in the directory where the file is itself. When running it elsewhere and specifying the config file using --config, the exclude would however stop working.
This is strange behaviour as all other paths in this file, such as the one to my bootstrap file, or the ones, are behaving correctly regardless.
What makes it even more odd is that adding a leading slash to just the section of my test suite will fix the problem with its behaving relative as well.
<testsuite name="ValueParsers">
<directory>/ValueParsers/tests</directory>
<exclude>ValueParsers/tests/includes/api</exclude>
</testsuite>
So I'm guessing this is either a bug. Or paths not starting with a slash are simply not officially supported, and most of them are just working by chance.
Upgraded to 3.7.21 and still seeing the issue. Though now it seems adding leading slashes does no longer work around the behaviour.