This repository was archived by the owner on Oct 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +25
-22
lines changed Expand file tree Collapse file tree 4 files changed +25
-22
lines changed Original file line number Diff line number Diff line change 1111 ],
1212 "require" : {
1313 "php" : " ^5.5 || ^7.0 || ^8.0" ,
14- "phpunit/phpunit" : " ^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.0 || ^9.0"
14+ "phpunit/phpunit" : " ^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.0 || ^9.0 || ^10.0 "
1515 },
1616 "require-dev" : {
1717 "friendsofphp/php-cs-fixer" : " ^2" ,
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
2- <phpunit bootstrap =" ./vendor/autoload.php" >
3- <filter >
4- <whitelist >
5- <directory >src</directory >
6- </whitelist >
7- </filter >
2+ <phpunit xmlns : xsi =' http://www.w3.org/2001/XMLSchema-instance'
3+ xsi : noNamespaceSchemaLocation =' ./vendor/phpunit/phpunit/phpunit.xsd'
4+ bootstrap =" ./vendor/autoload.php"
5+ cacheResult =" false"
6+ >
7+ <coverage >
8+ <include >
9+ <directory >./src</directory >
10+ </include >
11+ </coverage >
812 <testsuites >
913 <testsuite name =" Default" >
1014 <directory >tests</directory >
Original file line number Diff line number Diff line change @@ -16,9 +16,13 @@ trait PolyfillTrait
1616 {
1717 use PolyfillTrait6;
1818 }
19- } else {
19+ } elseif ( version_compare (\ PHPUnit \ Runner \Version:: id (), ' 10.0.0 ' ) < 0 ) {
2020 trait PolyfillTrait
2121 {
2222 use PolyfillTrait7;
2323 }
24+ } else {
25+ trait PolyfillTrait
26+ {
27+ }
2428}
Original file line number Diff line number Diff line change 99 * with this source code in the file LICENSE.
1010 */
1111
12- if (!class_exists ('PHPUnit\Framework\Error\Warning ' )) {
13- class_alias ('PHPUnit_Framework_Error_Warning ' , 'PHPUnit\Framework\Error\Warning ' );
14- }
15-
16- if (!class_exists ('PHPUnit\Framework\ExpectationFailedException ' )) {
17- class_alias ('PHPUnit_Framework_ExpectationFailedException ' , 'PHPUnit\Framework\ExpectationFailedException ' );
18- }
19-
20- if (!class_exists ('PHPUnit\Framework\TestCase ' )) {
21- class_alias ('PHPUnit_Framework_TestCase ' , 'PHPUnit\Framework\TestCase ' );
22- }
23-
24- if (!class_exists ('PHPUnit\Runner\Version ' )) {
25- class_alias ('PHPUnit_Runner_Version ' , 'PHPUnit\Runner\Version ' );
12+ foreach ([
13+ 'PHPUnit_Framework_Error_Warning ' => 'PHPUnit\Framework\Error\Warning ' ,
14+ 'PHPUnit_Framework_ExpectationFailedException ' => 'PHPUnit\Framework\ExpectationFailedException ' ,
15+ 'PHPUnit_Framework_TestCase ' => 'PHPUnit\Framework\TestCase ' ,
16+ 'PHPUnit_Runner_Version ' => 'PHPUnit\Runner\Version ' ,
17+ ] as $ old => $ new ) {
18+ if (!class_exists ($ new ) && class_exists ($ old )) {
19+ class_alias ($ old , $ new );
20+ }
2621}
You can’t perform that action at this time.
0 commit comments