function LoadTest::testLoadInvalidStatus in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/file/src/Tests/LoadTest.php \Drupal\file\Tests\LoadTest::testLoadInvalidStatus()
Try to load a non-existent file by status.
File
- core/
modules/ file/ src/ Tests/ LoadTest.php, line 38 - Contains \Drupal\file\Tests\LoadTest.
Class
- LoadTest
- Tests \Drupal\file\Entity\File::load().
Namespace
Drupal\file\TestsCode
function testLoadInvalidStatus() {
$files = entity_load_multiple_by_properties('file', array(
'status' => -99,
));
$this
->assertFalse(reset($files), 'Trying to load a file with an invalid status fails.');
$this
->assertFileHooksCalled(array());
}