File tree Expand file tree Collapse file tree 5 files changed +13
-20
lines changed
Expand file tree Collapse file tree 5 files changed +13
-20
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ matrix:
1616 - php : 7.3
1717 - php : 7.4
1818 - php : hhvm-3.18
19- install : composer require phpunit/phpunit:^5 --dev --no-interaction # requires legacy phpunit
2019 allow_failures :
2120 - php : hhvm-3.18
2221
Original file line number Diff line number Diff line change 2323 "react/promise" : " ^3.0 || ^2.7.0 || ^1.2.1"
2424 },
2525 "require-dev" : {
26- "phpunit/phpunit" : " ^7.0 || ^6.4 || ^5.7 || ^4.8.35"
26+ "phpunit/phpunit" : " ^9.0 || ^5.7 || ^4.8.35"
2727 }
2828}
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22
3- <phpunit bootstrap =" vendor/autoload.php"
4- colors =" true"
5- convertErrorsToExceptions =" true"
6- convertNoticesToExceptions =" true"
7- convertWarningsToExceptions =" true"
8- >
3+ <phpunit bootstrap =" vendor/autoload.php" colors =" true" >
94 <testsuites >
105 <testsuite name =" Promise Timer Test Suite" >
116 <directory >./tests/</directory >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9,7 +9,10 @@ class TestCase extends BaseTestCase
99{
1010 protected $ loop ;
1111
12- public function setUp ()
12+ /**
13+ * @before
14+ */
15+ public function setUpLoop ()
1316 {
1417 $ this ->loop = Factory::create ();
1518 }
@@ -41,7 +44,13 @@ protected function expectCallableNever()
4144 */
4245 protected function createCallableMock ()
4346 {
44- return $ this ->getMockBuilder ('React\Tests\Promise\Timer\CallableStub ' )->getMock ();
47+ if (method_exists ('PHPUnit\Framework\MockObject\MockBuilder ' , 'addMethods ' )) {
48+ // PHPUnit 9+
49+ return $ this ->getMockBuilder ('stdClass ' )->addMethods (array ('__invoke ' ))->getMock ();
50+ } else {
51+ // legacy PHPUnit 4 - PHPUnit 9
52+ return $ this ->getMockBuilder ('stdClass ' )->setMethods (array ('__invoke ' ))->getMock ();
53+ }
4554 }
4655
4756 protected function expectPromiseRejected ($ promise )
You can’t perform that action at this time.
0 commit comments