File tree 1 file changed +16
-0
lines changed
src/Symfony/Bridge/PhpUnit/Legacy
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bridge \PhpUnit \Legacy ;
13
13
14
+ use PHPUnit \Framework \ExpectationFailedException ;
14
15
use PHPUnit \Framework \MockObject \MockObject ;
15
16
use PHPUnit \Framework \TestCase ;
17
+ use SebastianBergmann \RecursionContext \InvalidArgumentException ;
16
18
17
19
/**
18
20
* This trait is @internal.
@@ -116,4 +118,18 @@ public function expectExceptionMessageRegExp($messageRegExp)
116
118
$ property ->setAccessible (true );
117
119
$ property ->setValue ($ this , $ messageRegExp );
118
120
}
121
+
122
+ /**
123
+ * Asserts that a string matches a given regular expression.
124
+ *
125
+ * @param string $pattern
126
+ * @param string $string
127
+ * @param string $message
128
+ *
129
+ * @return void
130
+ */
131
+ public function assertMatchesRegularExpression ($ pattern , $ string , $ message = '' )
132
+ {
133
+ $ this ->assertRegExp ($ pattern , $ string , $ message );
134
+ }
119
135
}
You can’t perform that action at this time.
0 commit comments