lithium\test\Unit::assertFileNotExists()

public method

Assert that a file does not exist.

$this->assertFileNotExists('/tmp/bar.txt'); // succeeds
$this->assertFileNotExists(__FILE__); // fails

Parameters

  • string $actual

    Absolute path to the actual file.

  • string|boolean $message

Returns

boolean

true if the assertion succeeded, false otherwise.

Source

	public function assertFileNotExists($actual, $message = '{:message}') {
		return $this->assert(!file_exists($actual), $message, [
			'expected' => $actual,
			'result' => !file_exists($actual)
		]);
	}