function MediaFileFieldTestCase::assertFileEntryNotExists in D7 Media 7.2
Same name and namespace in other branches
- 7.4 tests/media.test \MediaFileFieldTestCase::assertFileEntryNotExists()
- 7.3 tests/media.test \MediaFileFieldTestCase::assertFileEntryNotExists()
Asserts that a file does not exist in the database.
1 call to MediaFileFieldTestCase::assertFileEntryNotExists()
- MediaFileFieldRevisionTestCase::testRevisions in tests/
media.test - Tests creating multiple revisions of a node and managing attached files.
File
- tests/
media.test, line 233 - Tests for media.module.
Class
- MediaFileFieldTestCase
- Provides methods specifically for testing Media 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);
}