1 file.test FileTestHelper::assertFileNotExists($file, $message = NULL)

Asserts that a file does not exist on disk.

Parameters

File $file: File entity.

string $message: Message to display.

File

core/modules/file/tests/file.test, line 395
Tests for file.module.

Class

FileTestHelper
Provides methods specifically for testing File module's field handling.

Code

function assertFileNotExists($file, $message = NULL) {
  $message = isset($message) ? $message : format_string('File %file exists on the disk.', array('%file' => $file->uri));
  $this->assertFalse(is_file($file->uri), $message);
}