function FileFieldTestCase::assertFileEntryNotExists
Asserts that a file does not exist in the database.
1 call to FileFieldTestCase::assertFileEntryNotExists()
- FileFieldRevisionTestCase::testRevisions in modules/
file/ tests/ file.test - Tests creating multiple revisions of a node and managing attached files.
File
-
modules/
file/ tests/ file.test, line 208
Class
- FileFieldTestCase
- 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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.