function FileFieldTestCase::assertFileEntryExists in FileField 6.3
Assert that a file exists in the database.
5 calls to FileFieldTestCase::assertFileEntryExists()
- FileFieldRevisionTestCase::testRevisions in tests/
filefield.test - Test creating multiple revisions of a node and managing the attached files.
- FileFieldValidateTestCase::testFileExtension in tests/
filefield.test - Test the file extension, do additional checks if mimedetect is installed.
- FileFieldValidateTestCase::testFileMaxSize in tests/
filefield.test - Test the max file size validator.
- FileFieldValidateTestCase::testNodeMaxSize in tests/
filefield.test - Test the max file size per node validator.
- FileFieldValidateTestCase::testRequired in tests/
filefield.test - Test required property on file fields.
File
- tests/
filefield.test, line 164
Class
Code
function assertFileEntryExists($file, $message = NULL) {
module_load_include('inc', 'filefield', 'field_file');
$db_file = field_file_load($file['fid'], TRUE);
$message = isset($message) ? $message : t('File %file exists in database at the correct path.', array(
'%file' => $file['filepath'],
));
$this
->assertEqual($db_file['filepath'], $file['filepath'], $message);
}