File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Bridge \PhpUnit \Legacy ;
1313
14+ use PHPUnit \Framework \ExpectationFailedException ;
1415use PHPUnit \Framework \MockObject \MockObject ;
1516use PHPUnit \Framework \TestCase ;
17+ use SebastianBergmann \RecursionContext \InvalidArgumentException ;
1618
1719/**
1820 * This trait is @internal.
@@ -116,4 +118,18 @@ public function expectExceptionMessageRegExp($messageRegExp)
116118 $ property ->setAccessible (true );
117119 $ property ->setValue ($ this , $ messageRegExp );
118120 }
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+ }
119135}
You can’t perform that action at this time.
0 commit comments