You are here

protected function FileTest::postSetupFixture in Entity Share 8.2

Same name and namespace in other branches
  1. 8.3 modules/entity_share_client/tests/src/Functional/FileTest.php \Drupal\Tests\entity_share_client\Functional\FileTest::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 EntityShareClientFunctionalTestBase::postSetupFixture

1 call to FileTest::postSetupFixture()
FileTest::setUp in modules/entity_share_client/tests/src/Functional/FileTest.php
1 method overrides FileTest::postSetupFixture()
FileDeletedTest::postSetupFixture in modules/entity_share_client/tests/src/Functional/FileDeletedTest.php
Helper function.

File

modules/entity_share_client/tests/src/Functional/FileTest.php, line 97

Class

FileTest
Functional test class for file field.

Namespace

Drupal\Tests\entity_share_client\Functional

Code

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

  // Delete the physical file after populating the request service.

  /** @var \Drupal\Core\File\FileSystemInterface $file_system */
  $file_system = \Drupal::service('file_system');
  foreach (static::$filesData as $file_data) {
    $file_system
      ->delete($file_data['uri']);
  }
  $this
    ->deleteContent();
}