function FileFieldTestCase::assertFileIsPermanent

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

1 call to FileFieldTestCase::assertFileIsPermanent()
FileFieldRevisionTestCase::testRevisions in drupal/modules/file/tests/file.test
Tests creating multiple revisions of a node and managing attached files.

File

drupal/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);
}