You are here

function FileFieldTestBase::assertFileNotExists 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::assertFileNotExists()

Asserts that a file does not exist on disk.

1 call to FileFieldTestBase::assertFileNotExists()
FileFieldRevisionTest::testRevisions in core/modules/file/src/Tests/FileFieldRevisionTest.php
Tests creating multiple revisions of a node and managing attached files.

File

core/modules/file/src/Tests/FileFieldTestBase.php, line 283
Contains \Drupal\file\Tests\FileFieldTestBase.

Class

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

Namespace

Drupal\file\Tests

Code

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