function FileLoadTest::testLoadMissingFid in Drupal 7
Try to load a non-existent file by fid.
File
- modules/
simpletest/ tests/ file.test, line 2069 - This provides SimpleTests for the core file handling functionality. These include FileValidateTest and FileSaveTest.
Class
- FileLoadTest
- Tests the file_load() function.
Code
function testLoadMissingFid() {
$this
->assertFalse(file_load(-1), "Try to load an invalid fid fails.");
$this
->assertFileHooksCalled(array());
}