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 3
3
composer.lock
4
4
phpunit.xml
5
5
vendor
6
+ .phpunit.result.cache
Original file line number Diff line number Diff line change 18
18
"irc" : " irc://irc.freenode.org/amphp"
19
19
},
20
20
"require" : {
21
- "phpunit/phpunit" : " ^6 | ^7 | ^8"
21
+ "phpunit/phpunit" : " ^6 | ^7 | ^8 | ^9 "
22
22
},
23
23
"require-dev" : {
24
24
"amphp/amp" : " ^2" ,
Original file line number Diff line number Diff line change @@ -132,7 +132,14 @@ public function testSetMinimumRunTime(): \Generator
132
132
};
133
133
134
134
$ 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
+ }
136
143
yield call ($ func );
137
144
}
138
145
You can’t perform that action at this time.
0 commit comments