You are here

function FileFieldTestCase::assertFileIsPermanent in Drupal 7

Asserts that a file's status is set to permanent in the database.

1 call to FileFieldTestCase::assertFileIsPermanent()
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 217
Tests for file.module.

Class

FileFieldTestCase
Provides methods specifically for testing File 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);
}