You are here

protected function MultilingualTest::deleteAllEntities in Entity Share 8.3

Helper function to delete all (prepared or imported) content.

This function doesn't assert the deletion of entities.

1 call to MultilingualTest::deleteAllEntities()
MultilingualTest::testMultilingualImport in modules/entity_share_client/tests/src/Functional/MultilingualTest.php
Test several scenarios of importing the multilingual entities.

File

modules/entity_share_client/tests/src/Functional/MultilingualTest.php, line 160

Class

MultilingualTest
General functional test class for multilingual scenarios.

Namespace

Drupal\Tests\entity_share_client\Functional

Code

protected function deleteAllEntities() {
  $entity_storage = $this->entityTypeManager
    ->getStorage('node');
  $entities = $entity_storage
    ->loadByProperties();
  if ($entities) {
    foreach ($entities as $entity) {
      $entity
        ->delete();
    }
  }
  $this->entities = [];
}