public function MediaLibraryContext::tearDown in Lightning Media 8.3
Same name and namespace in other branches
- 8.2 tests/contexts/MediaLibraryContext.behat.inc \Acquia\LightningExtension\Context\MediaLibraryContext::tearDown()
@AfterScenario
File
- tests/
contexts/ MediaLibraryContext.behat.inc, line 29
Class
- MediaLibraryContext
- Contains step definitions to interact with the administrative media library.
Namespace
Acquia\LightningExtension\ContextCode
public function tearDown() {
$storage = \Drupal::entityTypeManager()
->getStorage('media');
$items = array_keys($this->media);
$items = $storage
->loadMultiple($items);
$storage
->delete($items);
}