File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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}
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