Skip to content

Commit 7d0bf12

Browse files
authored
Fix broken test coverage (#27)
* Fix tests - Remove invalid key in Coveralls config - Build folder should be ignored by git - Remove deprecated --dev composer argument in Travis config - Remove TravisCI composer suggestions output - Remove invalid server key in PHPUnit config - Add PHPUnit whitelist to enable coverage output * Add additional PHP versions to Travis matrix
1 parent d07da09 commit 7d0bf12

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

.coveralls.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
service_name: travis-ci
2-
src_dir: .
32
coverage_clover: build/logs/clover.xml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
vendor/*
2+
/build
23
composer.lock

.travis.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@ language: php
22

33
php:
44
- 7.1
5+
- 7.2
6+
- 7.3
7+
- 7.4
58

69
matrix:
710
fast_finish: true
811

912
before_script:
10-
- composer update --dev
13+
- composer update --no-interaction --no-suggest
1114

12-
script: vendor/bin/phpunit
15+
script:
16+
- composer test
1317

1418
after_script:
15-
- php vendor/bin/coveralls -v
19+
- vendor/bin/coveralls -v
1620

1721
notifications:
1822
email:

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,8 @@
2323
"phpunit/phpunit": "~6.0",
2424
"mockery/mockery": "~1.0",
2525
"satooshi/php-coveralls": "~1.0"
26+
},
27+
"scripts": {
28+
"test": "phpunit"
2629
}
2730
}

phpunit.xml.dist

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<phpunit bootstrap="./Tests/bootstrap.php" colors="true">
4-
<php>
5-
<server name="KERNEL_DIR" value="./Tests/App/app" />
6-
</php>
7-
84
<logging>
95
<log type="coverage-clover" target="build/logs/clover.xml"/>
106
</logging>
@@ -14,4 +10,11 @@
1410
<directory suffix="Test.php">./Tests</directory>
1511
</testsuite>
1612
</testsuites>
13+
14+
<filter>
15+
<whitelist>
16+
<file>ConfigHelper.php</file>
17+
<file>Rasterizer.php</file>
18+
</whitelist>
19+
</filter>
1720
</phpunit>

0 commit comments

Comments
 (0)