function FileFieldTestCase::assertFileIsPermanent

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

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.