File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 36
36
"ext-xmlwriter" : " *"
37
37
},
38
38
"require-dev" : {
39
- "phpunit/phpunit" : " ^8.0 || ^9.3.4 || ^10.5.32 || 11.3.3 - 11.5.28 || ^11.5.31"
39
+ "phpunit/phpunit" : " ^8.4. 0 || ^9.3.4 || ^10.5.32 || 11.3.3 - 11.5.28 || ^11.5.31"
40
40
},
41
41
"bin" : [
42
42
" bin/phpcbf" ,
Original file line number Diff line number Diff line change @@ -73,22 +73,15 @@ protected function expectRuntimeExceptionMessage($message)
73
73
74
74
75
75
/**
76
- * Helper method to tell PHPUnit to expect a PHPCS RuntimeException which matches a regex patten
77
- * in a PHPUnit cross-version compatible manner.
76
+ * Helper method to tell PHPUnit to expect a PHPCS RuntimeException which matches a regex pattern.
78
77
*
79
78
* @param string $regex The regex which should match.
80
79
*
81
80
* @return void
82
81
*/
83
82
protected function expectRuntimeExceptionRegex ($ regex )
84
83
{
85
- if (method_exists ($ this , 'expectExceptionMessageMatches ' ) === true ) {
86
- $ this ->expectException (RuntimeException::class);
87
- $ this ->expectExceptionMessageMatches ($ regex );
88
- } else {
89
- // PHPUnit < 8.4.0.
90
- $ this ->expectException (RuntimeException::class);
91
- $ this ->expectExceptionMessageRegExp ($ regex );
92
- }
84
+ $ this ->expectException (RuntimeException::class);
85
+ $ this ->expectExceptionMessageMatches ($ regex );
93
86
}
94
87
}
You can’t perform that action at this time.
0 commit comments