Skip to content

Commit f01b1b4

Browse files
committed
added phpunit.xml to be able to blacklist the vendor folder for code coverage; added coveralls.yml to override default file paths for coveralls
1 parent 0529d3c commit f01b1b4

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

.coveralls.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#.coveralls.yml
2+
3+
src_dir: lib/
4+
5+
# single file
6+
coverage_clover: test/output/clover.xml
7+
8+
9+
json_path: test/output/coveralls-upload.json

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"scripts": {
1212
"post-install-cmd": "if [ ! -f 'examples/example-config.json' ]; then echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json; fi",
1313
"post-update-cmd": "if [ ! -f 'examples/example-config.json' ]; then echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json; fi",
14-
"test": "phpunit --coverage-html test/output/report --coverage-clover test/output/clover.xml --bootstrap test/unit/bootstrap.php ./test/unit/"
14+
"test": "phpunit ./test/unit/"
1515
},
1616
"require": {
1717
"php": ">=5.3.0",

phpunit.xml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<phpunit
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd"
4+
backupGlobals="true"
5+
backupStaticAttributes="false"
6+
bootstrap="test/unit/bootstrap.php"
7+
cacheTokens="false"
8+
colors="always"
9+
convertErrorsToExceptions="true"
10+
convertNoticesToExceptions="true"
11+
convertWarningsToExceptions="true"
12+
forceCoversAnnotation="false"
13+
mapTestClassNameToCoveredClassName="false"
14+
printerClass="PHPUnit_TextUI_ResultPrinter"
15+
processIsolation="false"
16+
stopOnError="false"
17+
stopOnFailure="false"
18+
stopOnIncomplete="false"
19+
stopOnSkipped="false"
20+
stopOnRisky="false"
21+
testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader"
22+
timeoutForSmallTests="1"
23+
timeoutForMediumTests="10"
24+
timeoutForLargeTests="60"
25+
verbose="false">
26+
27+
28+
<logging>
29+
<log type="coverage-html" target="test/output/report"/>
30+
<log type="coverage-clover" target="test/output/clover.xml"/>
31+
</logging>
32+
<filter>
33+
<blacklist>
34+
<directory>./vendor</directory>
35+
</blacklist>
36+
</filter>
37+
</phpunit>

0 commit comments

Comments
 (0)