Skip to content

Commit 1e702d1

Browse files
committed
Add phpunit.xml.dist for coverage
1 parent 19ef76c commit 1e702d1

File tree

2 files changed

+35
-15
lines changed

2 files changed

+35
-15
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ install:
1010
- travis_retry composer require satooshi/php-coveralls "^1" --no-update --dev
1111
- travis_retry composer install
1212
script:
13-
- phpunit
13+
- phpunit -c phpunit.xml.dist
1414
cache:
1515
apt: true
1616
directories:

phpunit.xml.dist

+34-14
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,45 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit bootstrap="vendor/autoload.php"
33
backupGlobals="false"
4-
colors="true"
5-
stopOnFailure="true"
4+
convertErrorsToExceptions="true"
5+
convertNoticesToExceptions="true"
6+
convertWarningsToExceptions="true"
67
stopOnError="false"
8+
stopOnFailure="false"
79
verbose="true">
810

9-
<php>
10-
</php>
11-
<testsuites>
12-
11+
<filter>
12+
<whitelist>
13+
<directory suffix=".php">src/</directory>
14+
</whitelist>
15+
</filter>
1316

17+
<testsuites>
1418
<testsuite name="ClassTemplate">
15-
<directory suffix="Test.php">tests/ClassTemplate</directory>
16-
<exclude>
17-
<file>tests/ClassTemplate/ClassDeclareTraitTest.php</file>
18-
</exclude>
19-
</testsuite>
20-
21-
<testsuite name="ClassTrait">
22-
<file>tests/ClassTemplate/ClassDeclareTraitTest.php</file>
19+
<directory suffix="Test.php">tests/ClassTemplate</directory>
2320
</testsuite>
2421
</testsuites>
22+
23+
<logging>
24+
25+
<log type="coverage-text" target="php://stdout" showUncoveredFiles="true"/>
26+
27+
<log type="coverage-html"
28+
target="build/coverage"
29+
title="CodeGen"
30+
charset="UTF-8"
31+
yui="true"
32+
highlight="true"
33+
lowUpperBound="35"
34+
highLowerBound="70"/>
35+
36+
<log type="coverage-clover"
37+
target="build/logs/clover.xml"/>
38+
39+
<log type="junit"
40+
target="build/logs/junit.xml"
41+
logIncompleteSkipped="false"/>
42+
43+
</logging>
44+
2545
</phpunit>

0 commit comments

Comments
 (0)