PHPUnit_Framework_Assert::assertFileNotExists PHP Method

assertFileNotExists() public static method

Asserts that a file does not exist.
public static assertFileNotExists ( string $filename, string $message = '' )
$filename string
$message string
    public static function assertFileNotExists($filename, $message = '')
    {
        if (!is_string($filename)) {
            throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
        }
        $constraint = new PHPUnit_Framework_Constraint_Not(new PHPUnit_Framework_Constraint_FileExists());
        static::assertThat($filename, $constraint, $message);
    }

Usage Example

Example #1
0
/**
 * Asserts that a file does not exist.
 *
 * @param  string $filename
 * @param  string $message
 * @since  Method available since Release 3.0.0
 */
function assertFileNotExists($filename, $message = '')
{
    return PHPUnit_Framework_Assert::assertFileNotExists($filename, $message);
}
All Usage Examples Of PHPUnit_Framework_Assert::assertFileNotExists
PHPUnit_Framework_Assert