function FileFieldTestBase::assertFileEntryNotExists

Asserts that a file does not exist in the database.

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

File

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

Class

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

Namespace

Drupal\file\Tests

Code

function assertFileEntryNotExists($file, $message) {
  entity_get_controller('file')
    ->resetCache();
  $message = isset($message) ? $message : t('File %file exists in database at the correct path.', array(
    '%file' => $file->uri,
  ));
  $this
    ->assertFalse(file_load($file->fid), $message);
}