Asserts that a string matches a given format string.
@since Method available since Release 3.5.0
string $format:
string $string:
string $message:
public static function assertStringMatchesFormat($format, $string, $message = '') {
if (!is_string($format)) {
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
}
if (!is_string($string)) {
throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
}
$constraint = new PHPUnit_Framework_Constraint_StringMatches($format);
self::assertThat($string, $constraint, $message);
}