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

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

Parameters

File $file: File entity.

string $message: Message to display.

File

core/modules/file/tests/file.test, line 422
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);
}