function LoadTest::testLoadMissingFilepath in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/file/src/Tests/LoadTest.php \Drupal\file\Tests\LoadTest::testLoadMissingFilepath()
Try to load a non-existent file by URI.
File
- core/
modules/ file/ src/ Tests/ LoadTest.php, line 29 - Contains \Drupal\file\Tests\LoadTest.
Class
- LoadTest
- Tests \Drupal\file\Entity\File::load().
Namespace
Drupal\file\TestsCode
function testLoadMissingFilepath() {
$files = entity_load_multiple_by_properties('file', 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());
}