1 file.test FileTestHelper::assertFileIsPermanent($file, $message = NULL)

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

File

core/modules/file/tests/file.test, line 339
Tests for file.module.

Class

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