File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,16 @@ jobs:
3030 php-version : ${{ matrix.php }}
3131 coverage : xdebug
3232 - run : composer install
33- - run : vendor/bin/phpunit --coverage-text
33+ - run : vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml
3434 if : ${{ matrix.php >= 7.3 }}
35- - run : vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy
35+ - run : vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml - c phpunit.xml.legacy
3636 if : ${{ matrix.php < 7.3 }}
37+ - name : Check 100% code coverage
38+ shell : php {0}
39+ run : |
40+ <?php
41+ $metrics = simplexml_load_file('clover.xml')->project->metrics;
42+ exit((int) $metrics['statements'] === (int) $metrics['coveredstatements'] ? 0 : 1);
3743
3844 PHPUnit-hhvm :
3945 name : PHPUnit (HHVM)
Original file line number Diff line number Diff line change @@ -113,11 +113,14 @@ public function handleData($data)
113113 $ this ->buffer = (string )\substr ($ this ->buffer , $ newline + 1 );
114114
115115 // decode data with options given in ctor
116+ // @codeCoverageIgnoreStart
116117 if ($ this ->options === 0 ) {
117118 $ data = \json_decode ($ data , $ this ->assoc , $ this ->depth );
118119 } else {
120+ assert (\PHP_VERSION_ID >= 50400 );
119121 $ data = \json_decode ($ data , $ this ->assoc , $ this ->depth , $ this ->options );
120122 }
123+ // @codeCoverageIgnoreEnd
121124
122125 // abort stream if decoding failed
123126 if ($ data === null && \json_last_error () !== \JSON_ERROR_NONE ) {
You can’t perform that action at this time.
0 commit comments