File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 },
1919 "require-dev" : {
2020 "clue/block-react" : " ^1.1" ,
21- "phpunit/phpunit" : " ^7.0 || ^5.0 || ^4.8"
21+ "phpunit/phpunit" : " ^9.3 || ^5.7 || ^4.8"
2222 },
2323 "autoload" : {
2424 "psr-4" : { "Clue\\ React\\ Zenity\\ " : " src/" }
Original file line number Diff line number Diff line change @@ -13,7 +13,10 @@ class FunctionalLauncherTest extends TestCase
1313 private $ dialog ;
1414 private $ launcher ;
1515
16- public function setUp ()
16+ /**
17+ * @before
18+ */
19+ public function setUpLauncher ()
1720 {
1821 $ this ->loop = Factory::create ();
1922
Original file line number Diff line number Diff line change @@ -44,7 +44,13 @@ protected function expectCallableNever()
4444 */
4545 protected function createCallableMock ()
4646 {
47- return $ this ->getMockBuilder ('stdClass ' )->setMethods (array ('__invoke ' ))->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 8
52+ return $ this ->getMockBuilder ('stdClass ' )->setMethods (array ('__invoke ' ))->getMock ();
53+ }
4854 }
4955
5056 protected function expectPromiseResolve ($ promise )
Original file line number Diff line number Diff line change @@ -11,7 +11,10 @@ abstract class BaseZenTest extends TestCase
1111 protected $ process ;
1212 protected $ stdin = '' ;
1313
14- public function setUp ()
14+ /**
15+ * @before
16+ */
17+ public function setUpMocks ()
1518 {
1619 $ inbuffer =& $ this ->stdin ;
1720 $ this ->instream = $ this ->getMockBuilder ('React\Stream\WritableStreamInterface ' )->getMock ();
Original file line number Diff line number Diff line change 88
99class FunctionalBaseZenTest extends TestCase
1010{
11- public function setUp ()
11+ /**
12+ * @before
13+ */
14+ public function setUpLoop ()
1215 {
1316 $ this ->loop = Factory::create ();
1417 }
You can’t perform that action at this time.
0 commit comments