File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,19 @@ protected function tearDown(): void
2020
2121 public static function assertRegExp (string $ pattern , string $ string , string $ message = '' ): void
2222 {
23- self ::assertMatchesRegularExpression ($ pattern , $ string , $ message );
23+ if (method_exists (self ::class, 'assertMatchesRegularExpression ' )) {
24+ self ::assertMatchesRegularExpression ($ pattern , $ string , $ message );
25+ } else {
26+ parent ::assertRegExp ($ pattern , $ string , $ message );
27+ }
2428 }
2529
2630 public static function assertNotRegExp (string $ pattern , string $ string , string $ message = '' ): void
2731 {
28- self ::assertDoesNotMatchRegularExpression ($ pattern , $ string , $ message );
32+ if (method_exists (self ::class, 'assertDoesNotMatchRegularExpression ' )) {
33+ self ::assertDoesNotMatchRegularExpression ($ pattern , $ string , $ message );
34+ } else {
35+ parent ::assertNotRegExp ($ pattern , $ string , $ message );
36+ }
2937 }
3038}
You can’t perform that action at this time.
0 commit comments