You are here

public static function PHPUnit_Framework_Assert::assertFileNotExists in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Framework/Assert.php \PHPUnit_Framework_Assert::assertFileNotExists()

Asserts that a file does not exist.

@since Method available since Release 3.0.0

Parameters

string $filename:

string $message:

2 calls to PHPUnit_Framework_Assert::assertFileNotExists()
Framework_AssertTest::testAssertFileNotExists in vendor/phpunit/phpunit/tests/Framework/AssertTest.php
@covers PHPUnit_Framework_Assert::assertFileNotExists
Framework_AssertTest::testAssertFileNotExistsThrowsException in vendor/phpunit/phpunit/tests/Framework/AssertTest.php
@covers PHPUnit_Framework_Assert::assertFileNotExists @expectedException PHPUnit_Framework_Exception

File

vendor/phpunit/phpunit/src/Framework/Assert.php, line 897

Class

PHPUnit_Framework_Assert
A set of assert methods.

Code

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());
  self::assertThat($filename, $constraint, $message);
}