You are here

function FileFieldTestBase::assertFileExists in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/file/src/Tests/FileFieldTestBase.php \Drupal\file\Tests\FileFieldTestBase::assertFileExists()

Asserts that a file exists physically on disk.

8 calls to FileFieldTestBase::assertFileExists()
FileFieldRevisionTest::testRevisions in core/modules/file/src/Tests/FileFieldRevisionTest.php
Tests creating multiple revisions of a node and managing attached files.
FileFieldValidateTest::testFileExtension in core/modules/file/src/Tests/FileFieldValidateTest.php
Tests file extension checking.
FileFieldValidateTest::testFileMaxSize in core/modules/file/src/Tests/FileFieldValidateTest.php
Tests the max file size validator.
FileFieldValidateTest::testFileRemoval in core/modules/file/src/Tests/FileFieldValidateTest.php
Checks that a file can always be removed if it does not pass validation.
FileFieldValidateTest::testRequired in core/modules/file/src/Tests/FileFieldValidateTest.php
Tests the required property on file fields.

... See full list

File

core/modules/file/src/Tests/FileFieldTestBase.php, line 265
Contains \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 : format_string('File %file exists on the disk.', array(
    '%file' => $file
      ->getFileUri(),
  ));
  $this
    ->assertTrue(is_file($file
    ->getFileUri()), $message);
}