function FileLoadTest::testLoadMissingFilepath
7.x file.test | FileLoadTest::testLoadMissingFilepath() |
Try to load a non-existent file by URI.
File
- drupal-7.x/
modules/ simpletest/ tests/ file.test, line 1916 - This provides SimpleTests for the core file handling functionality. These include FileValidateTest and FileSaveTest.
Class
- FileLoadTest
- Tests the file_load() function.
Code
function testLoadMissingFilepath() {
$files = file_load_multiple(array(), array('uri' => 'foobar://misc/druplicon.png'));
$this->assertFalse(reset($files), "Try to load a file that doesn't exist in the database fails.");
$this->assertFileHooksCalled(array());
}