You are here

public function MediaLibraryContext::tearDown in Lightning Media 8.2

Same name and namespace in other branches
  1. 8.3 tests/contexts/MediaLibraryContext.behat.inc \Acquia\LightningExtension\Context\MediaLibraryContext::tearDown()

@AfterScenario

File

tests/contexts/MediaLibraryContext.behat.inc, line 20

Class

MediaLibraryContext

Namespace

Acquia\LightningExtension\Context

Code

public function tearDown() {
  $storage = \Drupal::entityTypeManager()
    ->getStorage('media');
  $items = array_keys($this->media);
  $items = $storage
    ->loadMultiple($items);
  $storage
    ->delete($items);
}