Skip to content

Instantly share code, notes, and snippets.

@EvanK
Created November 19, 2013 22:45
Show Gist options
  • Save EvanK/7553935 to your computer and use it in GitHub Desktop.
Save EvanK/7553935 to your computer and use it in GitHub Desktop.
Pro tip: PHPUnit's test suite "exclude" nodes don't do wildcard expansion. Took me longer than I'd like to admit figuring this out.
<phpunit>
<testsuites>
<testsuite name="Unit">
<directory>../src/*/Bundle/*Bundle/Tests</directory>
<exclude>src/*/Bundle/*Bundle/Tests/Functional</exclude>
</testsuite>
</phpunit>
<phpunit>
<testsuites>
<testsuite name="Unit Tests">
<directory>../src/*/Bundle/*Bundle/Tests</directory>
<exclude>src/MyProject/Bundle/MyFirstBundle/Tests/Functional</exclude>
<exclude>src/MyProject/Bundle/MySecondBundle/Tests/Functional</exclude>
<exclude>src/MyProject/Bundle/MyThirdBundle/Tests/Functional</exclude>
<exclude>src/MyProject/Bundle/MyNthBundle/Tests/Functional</exclude>
</testsuite>
</testsuites>
</phpunit>
@idhowardgj94
Copy link

ok, thanks... lol
took me a few hours to figure it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment