function FileLoadTest::testLoadMissingFid

Try to load a non-existent file by fid.

File

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

Class

FileLoadTest
Tests the file_load() function.

Code

function testLoadMissingFid() {
    $this->assertFalse(file_load(-1), "Try to load an invalid fid fails.");
    $this->assertFileHooksCalled(array());
}

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