FileLoadTest::testLoadMissingFilepath

7 file.test FileLoadTest::testLoadMissingFilepath()
8 file.test FileLoadTest::testLoadMissingFilepath()

Try to load a non-existent file by URI.

File

modules/simpletest/tests/file.test, line 1916
This provides SimpleTests for the core file handling functionality. These include FileValidateTest and FileSaveTest.

Code

function testLoadMissingFilepath() {
  $files = file_load_multiple(array(), array('uri' => 'foobar://misc/druplicon.png'));
  $this->assertFalse(reset($files), t("Try to load a file that doesn't exist in the database fails."));
  $this->assertFileHooksCalled(array());
}
Login or register to post comments