File tree Expand file tree Collapse file tree 4 files changed +17
-14
lines changed Expand file tree Collapse file tree 4 files changed +17
-14
lines changed Original file line number Diff line number Diff line change 77jobs :
88 PHPUnit :
99 name : PHPUnit (PHP ${{ matrix.php }})
10- runs-on : ubuntu-20 .04
10+ runs-on : ubuntu-22 .04
1111 strategy :
1212 matrix :
1313 php :
1414 - 8.2
1515 - 8.1
1616 steps :
17- - uses : actions/checkout@v2
17+ - uses : actions/checkout@v3
1818 - uses : shivammathur/setup-php@v2
1919 with :
2020 php-version : ${{ matrix.php }}
2121 coverage : xdebug
22+ ini-file : development
2223 - run : composer install
2324 - run : vendor/bin/phpunit --coverage-text
Original file line number Diff line number Diff line change 3131 "react/promise" : " ^3.0 || ^2.8 || ^1.2.1"
3232 },
3333 "require-dev" : {
34- "phpunit/phpunit" : " ^9.3 "
34+ "phpunit/phpunit" : " ^9.5 "
3535 },
3636 "autoload" : {
3737 "psr-4" : {
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22
3- <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4- xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3 /phpunit.xsd"
3+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.5 /phpunit.xsd"
55 bootstrap =" vendor/autoload.php"
6+ cacheResult =" false"
67 colors =" true"
7- cacheResult = " false " >
8+ convertDeprecationsToExceptions = " true " >
89 <testsuites >
910 <testsuite name =" React Test Suite" >
1011 <directory >./tests/</directory >
1516 <directory >./src/</directory >
1617 </include >
1718 </coverage >
19+ <php >
20+ <ini name =" error_reporting" value =" -1" />
21+ <!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
22+ <!-- <ini name="zend.assertions=1" value="1" /> -->
23+ <ini name =" assert.active" value =" 1" />
24+ <ini name =" assert.exception" value =" 1" />
25+ <ini name =" assert.bail" value =" 0" />
26+ </php >
1827</phpunit >
Original file line number Diff line number Diff line change 22
33namespace React \Tests \Async ;
44
5- use PHPUnit \Framework \MockObject \MockBuilder ;
65use PHPUnit \Framework \TestCase as BaseTestCase ;
76
87class TestCase extends BaseTestCase
@@ -40,12 +39,6 @@ protected function expectCallableNever()
4039
4140 protected function createCallableMock ()
4241 {
43- if (method_exists (MockBuilder::class, 'addMethods ' )) {
44- // PHPUnit 9+
45- return $ this ->getMockBuilder (\stdClass::class)->addMethods (['__invoke ' ])->getMock ();
46- } else {
47- // PHPUnit < 9
48- return $ this ->getMockBuilder (\stdClass::class)->setMethods (['__invoke ' ])->getMock ();
49- }
42+ return $ this ->getMockBuilder (\stdClass::class)->addMethods (['__invoke ' ])->getMock ();
5043 }
5144}
You can’t perform that action at this time.
0 commit comments