PHPUnit_Framework_Assert::assertDirectoryExists PHP Method

assertDirectoryExists() public static method

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

Usage Example

Esempio n. 1
0
 public function isExist()
 {
     Assert::assertDirectoryExists($this->actual, $this->description);
     return $this;
 }
PHPUnit_Framework_Assert