function MediaFileFieldTestCase::assertFileIsPermanent in D7 Media 7.3
Same name and namespace in other branches
- 7.4 tests/media.test \MediaFileFieldTestCase::assertFileIsPermanent()
- 7.2 tests/media.test \MediaFileFieldTestCase::assertFileIsPermanent()
Asserts that a file's status is set to permanent in the database.
1 call to MediaFileFieldTestCase::assertFileIsPermanent()
- MediaFileFieldRevisionTestCase::testRevisions in tests/
media.test - Tests creating multiple revisions of a node and managing attached files.
File
- tests/
media.test, line 242 - Tests for media.module.
Class
- MediaFileFieldTestCase
- Provides methods specifically for testing Media module's field handling.
Code
function assertFileIsPermanent($file, $message = NULL) {
$message = isset($message) ? $message : format_string('File %file is permanent.', array(
'%file' => $file->uri,
));
$this
->assertTrue($file->status == FILE_STATUS_PERMANENT, $message);
}