You are here

protected function FileDeletedTest::postSetupFixture in Entity Share 8.3

Same name and namespace in other branches
  1. 8.2 modules/entity_share_client/tests/src/Functional/FileDeletedTest.php \Drupal\Tests\entity_share_client\Functional\FileDeletedTest::postSetupFixture()

Helper function.

Need to separate those steps from the setup in the base class, because some sub-class setup may change the content of the fixture.

Overrides FileTest::postSetupFixture

File

modules/entity_share_client/tests/src/Functional/FileDeletedTest.php, line 32

Class

FileDeletedTest
Test class for file field where the physical file had been deleted.

Namespace

Drupal\Tests\entity_share_client\Functional

Code

protected function postSetupFixture() {
  $this
    ->prepareContent();

  // Delete the physical file before populating the request service.
  foreach (static::$filesData as $file_data) {
    $this->fileSystem
      ->delete($file_data['uri']);
  }
  $this
    ->populateRequestService();
  $this
    ->deleteContent();
}