function FileFieldTestCase::assertFileExists

Asserts that a file exists physically on disk.

8 calls to FileFieldTestCase::assertFileExists()
FileFieldRevisionTestCase::testRevisions in modules/file/tests/file.test
Tests creating multiple revisions of a node and managing attached files.
FileFieldValidateTestCase::testFileExtension in modules/file/tests/file.test
Tests file extension checking.
FileFieldValidateTestCase::testFileMaxSize in modules/file/tests/file.test
Tests the max file size validator.
FileFieldValidateTestCase::testRequired in modules/file/tests/file.test
Tests the required property on file fields.
FileFieldWidgetTestCase::doTestTemporaryFileRemovalExploit in modules/file/tests/file.test
Helper for testing exploiting the temporary file removal using fid.

... See full list

File

modules/file/tests/file.test, line 182

Class

FileFieldTestCase
Provides methods specifically for testing File module's field handling.

Code

function assertFileExists($file, $message = NULL) {
    $message = isset($message) ? $message : format_string('File %file exists on the disk.', array(
        '%file' => $file->uri,
    ));
    $this->assertTrue(is_file($file->uri), $message);
}

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