File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 "php" : " >=5.4.0"
1010 },
1111 "require-dev" : {
12- "phpunit/phpunit" : " ^7.0 || ^6.5 || ^5.7 || ^4.8.36"
12+ "phpunit/phpunit" : " ^9.0 || ^5.7 || ^4.8.36"
1313 },
1414 "autoload" : {
1515 "psr-4" : {
Original file line number Diff line number Diff line change @@ -36,7 +36,13 @@ public function expectCallableNever()
3636
3737 public function createCallableMock ()
3838 {
39- return $ this ->getMockBuilder ('stdClass ' )->setMethods (array ('__invoke ' ))->getMock ();
39+ if (method_exists ('PHPUnit\Framework\MockObject\MockBuilder ' , 'addMethods ' )) {
40+ // PHPUnit 10+
41+ return $ this ->getMockBuilder ('stdClass ' )->addMethods (array ('__invoke ' ))->getMock ();
42+ } else {
43+ // legacy PHPUnit 4 - PHPUnit 9
44+ return $ this ->getMockBuilder ('stdClass ' )->setMethods (array ('__invoke ' ))->getMock ();
45+ }
4046 }
4147
4248 public function setExpectedException ($ exception , $ exceptionMessage = '' , $ exceptionCode = null )
You can’t perform that action at this time.
0 commit comments