Asserts that a file's status is set to permanent in the database.
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);
}