File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11language : php
22
3- php :
4- - 5.4
5- - 5.5
6- - 5.6
7- - 7.0
8- - 7.1
9- - 7.2
10- - 7.3
11- - 7.4
12- - nightly # ignore errors, see below
13- - hhvm # ignore errors, see below
14-
153# lock distro so new future defaults will not break the build
164dist : trusty
175
18- matrix :
6+ jobs :
7+ include :
8+ - php : 5.4
9+ - php : 5.5
10+ - php : 5.6
11+ - php : 7.0
12+ - php : 7.1
13+ - php : 7.2
14+ - php : 7.3
15+ - php : 7.4
16+ - php : hhvm-3.18
1917 allow_failures :
20- - php : hhvm
21- - php : nightly
18+ - php : hhvm-3.18
2219
2320install :
2421 - composer install
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 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22
3- <phpunit backupGlobals =" false"
4- backupStaticAttributes =" false"
5- colors =" true"
6- convertErrorsToExceptions =" true"
7- convertNoticesToExceptions =" true"
8- convertWarningsToExceptions =" true"
9- processIsolation =" false"
10- stopOnFailure =" false"
11- bootstrap =" vendor/autoload.php"
12- >
3+ <phpunit bootstrap =" vendor/autoload.php" colors =" true" >
134 <testsuites >
145 <testsuite name =" Promise Test Suite" >
156 <directory >./tests/</directory >
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