File tree Expand file tree Collapse file tree 8 files changed +14
-15
lines changed Expand file tree Collapse file tree 8 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,7 @@ before_script:
1313
1414# Explicitly use the phpunit from composer, not any system-wide found
1515script :
16- - vendor/bin/phpunit tests
17- # newer versions of phpunit allow this configuration: -c phpunit.xml --coverage-clover=coverage.xml tests
16+ - php vendor/bin/phpunit --coverage-clover build/coverage/xml tests
1817
1918after_success :
20- - php vendor/bin/codacycoverage clover
19+ - php vendor/bin/codacycoverage clover build/coverage/xml
Original file line number Diff line number Diff line change 1111- PHP 5.3 or later
1212- One of the following coverage report formats
1313 - Clover XML (e.g. ``` --coverage-clover ``` in PHPUnit)
14- - PHPUnit XML (e.g. ``` --coverage-xml ``` in PHPUnit)
14+ - [ Only for PHPUnit <4 ] PHPUnit XML (e.g. ``` --coverage-xml ``` in PHPUnit)
1515
1616# Installation
1717
@@ -124,10 +124,10 @@ before_script:
124124 - php composer.phar install -n
125125
126126script :
127- - php vendor/bin/phpunit
127+ - php vendor/bin/phpunit --coverage-clover build/coverage/xml
128128
129129after_script :
130- - php vendor/bin/codacycoverage clover path/to/clover. xml
130+ - php vendor/bin/codacycoverage clover build/coverage/ xml
131131` ` `
132132
133133## Troubleshooting
Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ dependencies:
99
1010test :
1111 post :
12- - php vendor/bin/phpunit
13- - php bin/codacycoverage clover
12+ - php vendor/bin/phpunit --coverage-clover build/coverage/xml tests
13+ - php bin/codacycoverage clover build/coverage/xml
Original file line number Diff line number Diff line change 99 "symfony/console" : " ~2.5|~3.0"
1010 },
1111 "require-dev" : {
12- "phpunit/phpunit" : " ~4 .5"
12+ "phpunit/phpunit" : " ~6 .5"
1313 },
1414 "bin" : [" bin/codacycoverage" ],
1515 "autoload" : {
Original file line number Diff line number Diff line change 22
33use Codacy \Coverage \Parser \CloverParser ;
44
5- class CloverParserTest extends PHPUnit_Framework_TestCase
5+ class CloverParserTest extends \ PHPUnit \ Framework \TestCase
66{
77
88 public function testThrowsExceptionOnWrongPath ()
99 {
10- $ this ->setExpectedException ('InvalidArgumentException ' );
10+ $ this ->expectException ('InvalidArgumentException ' );
1111 new CloverParser ("/home/foo/bar/baz/m.xml " );
1212 }
1313
Original file line number Diff line number Diff line change 55
66use Codacy \Coverage \Util \JsonProducer ;
77
8- class ParserTest extends \PHPUnit_Framework_TestCase
8+ class ParserTest extends \PHPUnit \ Framework \TestCase
99{
1010 /**
1111 * Running against tests/res/phpunit-clover
Original file line number Diff line number Diff line change 22
33use Codacy \Coverage \Parser \PhpUnitXmlParser ;
44
5- class PhpUnitXmlParserTest extends PHPUnit_Framework_TestCase
5+ class PhpUnitXmlParserTest extends \ PHPUnit \ Framework \TestCase
66{
77
88
99 public function testThrowsExceptionOnWrongPath ()
1010 {
11- $ this ->setExpectedException ('InvalidArgumentException ' );
11+ $ this ->expectException ('InvalidArgumentException ' );
1212 new PhpUnitXmlParser ("/home/foo/bar/baz/fake.xml " );
1313 }
1414
Original file line number Diff line number Diff line change 22
33use Codacy \Coverage \Util \GitClient ;
44
5- class GitClientTest extends PHPUnit_Framework_TestCase
5+ class GitClientTest extends \ PHPUnit \ Framework \TestCase
66{
77 public function testGetHashOfLastCommit ()
88 {
You can’t perform that action at this time.
0 commit comments