PHPUnit_Framework_Assert::assertDirectoryNotExists PHP Method

assertDirectoryNotExists() public static method

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

Usage Example

示例#1
0
 public function isNotExist()
 {
     Assert::assertDirectoryNotExists($this->actual, $this->description);
     return $this;
 }
PHPUnit_Framework_Assert