Skip to content

Commit 04b423b

Browse files
committed
Fixed default phpunit.xml.dist: add filter/whitelist
If we don't do that, phpunit is not able to compute the code coverage. We get the following error without it: ``` Error: Incorrect whitelist config, no code coverage will be generated. ```
1 parent 00dbd80 commit 04b423b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

phpunit/phpunit/4.7/phpunit.xml.dist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@
2222
<directory>tests/</directory>
2323
</testsuite>
2424
</testsuites>
25+
26+
<filter>
27+
<whitelist>
28+
<directory>./src/</directory>
29+
</whitelist>
30+
</filter>
2531
</phpunit>

symfony/phpunit-bridge/3.3/phpunit.xml.dist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
</testsuite>
2424
</testsuites>
2525

26+
<filter>
27+
<whitelist>
28+
<directory>./src/</directory>
29+
</whitelist>
30+
</filter>
31+
2632
<listeners>
2733
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
2834
</listeners>

0 commit comments

Comments
 (0)