File tree Expand file tree Collapse file tree 3 files changed +25
-10
lines changed Expand file tree Collapse file tree 3 files changed +25
-10
lines changed Original file line number Diff line number Diff line change 11language : php
22
3- php :
4- # - 5.3 # requires old distro, see below
5- - 5.4
6- - 5.5
7- - 5.6
8- - 7
9- - hhvm # ignore errors, see below
10-
113# lock distro so new future defaults will not break the build
124dist : trusty
135
146matrix :
157 include :
168 - php : 5.3
179 dist : precise
10+ - php : 5.4
11+ - php : 5.5
12+ - php : 5.6
13+ - php : 7.0
14+ - php : 7.1
15+ - php : 7.2
16+ - php : 7.3
17+ - php : 7.4
18+ - php : hhvm-3.18
1819 allow_failures :
19- - php : hhvm
20+ - php : hhvm-3.18
2021
2122sudo : false
2223
Original file line number Diff line number Diff line change 2323 "ringcentral/psr7" : " ^1.2"
2424 },
2525 "require-dev" : {
26- "phpunit/phpunit" : " ^5.0 || ^4.8" ,
26+ "phpunit/phpunit" : " ^7.0 || ^ 5.0 || ^4.8" ,
2727 "react/event-loop" : " ^1.0 || ^0.5 || ^0.4 || ^0.3" ,
2828 "clue/block-react" : " ^1.1"
2929 }
Original file line number Diff line number Diff line change @@ -97,11 +97,25 @@ public function testCancelWhileConnectingShouldNotCreateGarbageCycles()
9797 $ proxy = new ProxyConnector ('google.com ' , $ this ->dnsConnector );
9898
9999 gc_collect_cycles ();
100+ gc_collect_cycles (); // clear twice to avoid leftovers in PHP 7.4 with ext-xdebug and code coverage turned on
100101
101102 $ promise = $ proxy ->connect ('google.com:80 ' );
102103 $ promise ->cancel ();
103104 unset($ promise );
104105
105106 $ this ->assertEquals (0 , gc_collect_cycles ());
106107 }
108+
109+ public function setExpectedException ($ exception , $ message = '' , $ code = 0 )
110+ {
111+ if (method_exists ($ this , 'expectException ' )) {
112+ $ this ->expectException ($ exception );
113+ if ($ message !== null ) {
114+ $ this ->expectExceptionMessage ($ message );
115+ }
116+ $ this ->expectExceptionCode ($ code );
117+ } else {
118+ parent ::setExpectedException ($ exception , $ message , $ code );
119+ }
120+ }
107121}
You can’t perform that action at this time.
0 commit comments