1 file.test FileTestHelper::assertFileEntryNotExists($file, $message)

Asserts that a file does not exist in the database.

Parameters

File $file: File entity.

string $message: Message to display.

File

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

Class

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

Code

function assertFileEntryNotExists($file, $message) {
  entity_get_controller('file')->resetCache();
  $message = isset($message) ? $message : format_string('File %file exists in database at the correct path.', array('%file' => $file->uri));
  $this->assertFalse(file_load($file->fid), $message);
}