PHPUnit_Framework_Assert::assertStringNotMatchesFormatFile PHP Method

assertStringNotMatchesFormatFile() public static method

Asserts that a string does not match a given format string.
public static assertStringNotMatchesFormatFile ( string $formatFile, string $string, string $message = '' )
$formatFile string
$string string
$message string
    public static function assertStringNotMatchesFormatFile($formatFile, $string, $message = '')
    {
        static::assertFileExists($formatFile, $message);
        if (!is_string($string)) {
            throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
        }
        $constraint = new PHPUnit_Framework_Constraint_Not(new PHPUnit_Framework_Constraint_StringMatches(file_get_contents($formatFile)));
        static::assertThat($string, $constraint, $message);
    }

Usage Example

Example #1
0
/**
 * Asserts that a string does not match a given format string.
 *
 * @param  string $formatFile
 * @param  string $string
 * @param  string $message
 * @since  Method available since Release 3.5.0
 */
function assertStringNotMatchesFormatFile($formatFile, $string, $message = '')
{
    return PHPUnit_Framework_Assert::assertStringNotMatchesFormatFile($formatFile, $string, $message);
}
All Usage Examples Of PHPUnit_Framework_Assert::assertStringNotMatchesFormatFile
PHPUnit_Framework_Assert