File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 33composer.lock
44phpunit.xml
55vendor
6+ .phpunit.result.cache
Original file line number Diff line number Diff line change 1818 "irc" : " irc://irc.freenode.org/amphp"
1919 },
2020 "require" : {
21- "phpunit/phpunit" : " ^6 | ^7 | ^8"
21+ "phpunit/phpunit" : " ^6 | ^7 | ^8 | ^9 "
2222 },
2323 "require-dev" : {
2424 "amphp/amp" : " ^2" ,
Original file line number Diff line number Diff line change @@ -132,7 +132,14 @@ public function testSetMinimumRunTime(): \Generator
132132 };
133133
134134 $ this ->expectException (AssertionFailedError::class);
135- $ this ->expectExceptionMessageRegExp ("/Expected test to take at least 100ms but instead took (\d+)ms/ " );
135+ $ pattern = "/Expected test to take at least 100ms but instead took (\d+)ms/ " ;
136+ if (\method_exists ($ this , 'expectExceptionMessageMatches ' )) {
137+ // PHPUnit 8+
138+ $ this ->expectExceptionMessageMatches ($ pattern );
139+ } else {
140+ // PHPUnit 6-7
141+ $ this ->expectExceptionMessageRegExp ($ pattern );
142+ }
136143 yield call ($ func );
137144 }
138145
You can’t perform that action at this time.
0 commit comments