lithium\test\Unit::assertPattern()
Assert that the regular expression $expected
is matched in the result.
Parameters
-
mixed
$expected
-
mixed
$result
-
string
$message
Returns
booleantrue
if the assertion succeeded, false
otherwise.
Source
public function assertPattern($expected, $result, $message = '{:message}') {
list($expected, $result) = $this->_normalizeLineEndings($expected, $result);
$params = compact('expected', 'result');
return $this->assert(!!preg_match($expected, $result), $message, $params);
}