function FileLoadTest::testLoadMissingFilepath
Try to load a non-existent file by URI.
File
-
modules/
simpletest/ tests/ file.test, line 2122
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());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.