function FileFieldTestBase::assertFileExists

Asserts that a file exists physically on disk.

7 calls to FileFieldTestBase::assertFileExists()
FileFieldRevisionTest::testRevisions in drupal/core/modules/file/lib/Drupal/file/Tests/FileFieldRevisionTest.php
Tests creating multiple revisions of a node and managing attached files.
FileFieldValidateTest::testFileExtension in drupal/core/modules/file/lib/Drupal/file/Tests/FileFieldValidateTest.php
Tests file extension checking.
FileFieldValidateTest::testFileMaxSize in drupal/core/modules/file/lib/Drupal/file/Tests/FileFieldValidateTest.php
Tests the max file size validator.
FileFieldValidateTest::testRequired in drupal/core/modules/file/lib/Drupal/file/Tests/FileFieldValidateTest.php
Tests the required property on file fields.
FileFieldWidgetTest::testPrivateFileComment in drupal/core/modules/file/lib/Drupal/file/Tests/FileFieldWidgetTest.php
Tests that download restrictions on private files work on comments.

... See full list

File

drupal/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php, line 201
Definition of Drupal\file\Tests\FileFieldTestBase.

Class

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

Namespace

Drupal\file\Tests

Code

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