function FileFieldTestCase::assertFileExists

Asserts that a file exists physically on disk.

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

... See full list

File

drupal/modules/file/tests/file.test, line 182
Tests for file.module.

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