protected function EntityShareClientFunctionalTestBase::resetImportedContent in Entity Share 8.3
Helper function to delete all (prepared or imported) content.
This function doesn't assert the deletion of entities.
7 calls to EntityShareClientFunctionalTestBase::resetImportedContent()
- AuthenticationBasicAuthTest::testImport in modules/
entity_share_client/ tests/ src/ Functional/ AuthenticationBasicAuthTest.php - Test that correct entities are created with different authentications.
- AuthenticationOAuthTest::testImport in modules/
entity_share_client/ tests/ src/ Functional/ AuthenticationOAuthTest.php - Test that correct entities are created with different authentications.
- ContentEntityReferenceTest::testEntityReference in modules/
entity_share_client/ tests/ src/ Functional/ ContentEntityReferenceTest.php - Test that entity reference values are good, and that entities are created.
- FileTest::testBasicPull in modules/
entity_share_client/ tests/ src/ Functional/ FileTest.php - Test basic pull feature.
- InfiniteLoopTest::testInfiniteLoop in modules/
entity_share_client/ tests/ src/ Functional/ InfiniteLoopTest.php - Test that a referenced entity is pulled even if not selected.
File
- modules/
entity_share_client/ tests/ src/ Functional/ EntityShareClientFunctionalTestBase.php, line 649
Class
- EntityShareClientFunctionalTestBase
- Base class for Entity Share Client functional tests.
Namespace
Drupal\Tests\entity_share_client\FunctionalCode
protected function resetImportedContent() {
$entity_type_ids = array_keys($this
->getEntitiesDataArray());
foreach ($entity_type_ids as $entity_type_id) {
$entity_storage = $this->entityTypeManager
->getStorage($entity_type_id);
$entities = $entity_storage
->loadByProperties();
if ($entities) {
foreach ($entities as $entity) {
$entity
->delete();
}
}
}
$this->entities = [];
$this->importService
->getRuntimeImportContext()
->clearImportedEntities();
}