You are here

function FileLoadTest::testLoadInvalidStatus in Drupal 7

Try to load a non-existent file by status.

File

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

Class

FileLoadTest
Tests the file_load() function.

Code

function testLoadInvalidStatus() {
  $files = file_load_multiple(array(), array(
    'status' => -99,
  ));
  $this
    ->assertFalse(reset($files), "Trying to load a file with an invalid status fails.");
  $this
    ->assertFileHooksCalled(array());
}