function FileLoadTest::testLoadInvalidStatus

Try to load a non-existent file by status.

File

modules/simpletest/tests/file.test, line 2131

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());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.