File tree 4 files changed +17
-14
lines changed
4 files changed +17
-14
lines changed Original file line number Diff line number Diff line change 7
7
jobs :
8
8
PHPUnit :
9
9
name : PHPUnit (PHP ${{ matrix.php }})
10
- runs-on : ubuntu-20 .04
10
+ runs-on : ubuntu-22 .04
11
11
strategy :
12
12
matrix :
13
13
php :
14
14
- 8.2
15
15
- 8.1
16
16
steps :
17
- - uses : actions/checkout@v2
17
+ - uses : actions/checkout@v3
18
18
- uses : shivammathur/setup-php@v2
19
19
with :
20
20
php-version : ${{ matrix.php }}
21
21
coverage : xdebug
22
+ ini-file : development
22
23
- run : composer install
23
24
- run : vendor/bin/phpunit --coverage-text
Original file line number Diff line number Diff line change 31
31
"react/promise" : " ^3.0 || ^2.8 || ^1.2.1"
32
32
},
33
33
"require-dev" : {
34
- "phpunit/phpunit" : " ^9.3 "
34
+ "phpunit/phpunit" : " ^9.5 "
35
35
},
36
36
"autoload" : {
37
37
"psr-4" : {
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
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"
5
5
bootstrap =" vendor/autoload.php"
6
+ cacheResult =" false"
6
7
colors =" true"
7
- cacheResult = " false " >
8
+ convertDeprecationsToExceptions = " true " >
8
9
<testsuites >
9
10
<testsuite name =" React Test Suite" >
10
11
<directory >./tests/</directory >
15
16
<directory >./src/</directory >
16
17
</include >
17
18
</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 >
18
27
</phpunit >
Original file line number Diff line number Diff line change 2
2
3
3
namespace React \Tests \Async ;
4
4
5
- use PHPUnit \Framework \MockObject \MockBuilder ;
6
5
use PHPUnit \Framework \TestCase as BaseTestCase ;
7
6
8
7
class TestCase extends BaseTestCase
@@ -40,12 +39,6 @@ protected function expectCallableNever()
40
39
41
40
protected function createCallableMock ()
42
41
{
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 ();
50
43
}
51
44
}
You can’t perform that action at this time.
0 commit comments