File tree Expand file tree Collapse file tree 5 files changed +20
-5
lines changed
Expand file tree Collapse file tree 5 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 2424 "react/promise" : " ^2.0 || ^1.0"
2525 },
2626 "require-dev" : {
27- "phpunit/phpunit" : " ^7.0 || ^6.0 || ^5.0 || ^4.8.35"
27+ "phpunit/phpunit" : " ^9.3 || ^5.7 || ^4.8.35"
2828 }
2929}
Original file line number Diff line number Diff line change @@ -8,7 +8,10 @@ class DeferredShellTest extends TestCase
88{
99 private $ stream ;
1010
11- public function setUp ()
11+ /**
12+ * @before
13+ */
14+ public function setUpStream ()
1215 {
1316 $ this ->stream = $ this ->getMockBuilder ('React\Stream\DuplexStreamInterface ' )->getMock ();
1417 }
Original file line number Diff line number Diff line change @@ -10,7 +10,10 @@ class FunctionalTest extends TestCase
1010 private $ loop ;
1111 private $ launcher ;
1212
13- public function setUp ()
13+ /**
14+ * @before
15+ */
16+ public function setUpLauncher ()
1417 {
1518 $ this ->loop = Factory::create ();
1619 $ this ->launcher = new ProcessLauncher ($ this ->loop );
Original file line number Diff line number Diff line change @@ -9,7 +9,10 @@ class ProcessLauncherTest extends TestCase
99 private $ loop ;
1010 private $ processLauncher ;
1111
12- public function setUp ()
12+ /**
13+ * @before
14+ */
15+ public function setUpProcessLauncher ()
1316 {
1417 $ this ->loop = $ this ->getMockBuilder ('React\EventLoop\LoopInterface ' )->getMock ();
1518 $ this ->processLauncher = new ProcessLauncher ($ this ->loop );
Original file line number Diff line number Diff line change @@ -54,7 +54,13 @@ protected function expectCallableOnceParameter($type)
5454
5555 protected function createCallableMock ()
5656 {
57- return $ this ->getMockBuilder ('stdClass ' )->setMethods (array ('__invoke ' ))->getMock ();
57+ if (method_exists ('PHPUnit\Framework\MockObject\MockBuilder ' , 'addMethods ' )) {
58+ // PHPUnit 9+
59+ return $ this ->getMockBuilder ('stdClass ' )->addMethods (array ('__invoke ' ))->getMock ();
60+ } else {
61+ // legacy PHPUnit 4 - PHPUnit 8
62+ return $ this ->getMockBuilder ('stdClass ' )->setMethods (array ('__invoke ' ))->getMock ();
63+ }
5864 }
5965
6066 protected function expectPromiseResolve ($ promise )
You can’t perform that action at this time.
0 commit comments