protected function MigrationTestBase::postMigration in Lightning Workflow 8.2
Same name and namespace in other branches
- 8.3 modules/lightning_scheduler/tests/src/Functional/MigrationTestBase.php \Drupal\Tests\lightning_scheduler\Functional\MigrationTestBase::postMigration()
Runs post-migration assertions for an entity type.
Parameters
string $entity_type_id: The entity type ID.
Return value
\Drupal\Core\Entity\EntityStorageInterface The storage handler for the entity type.
2 calls to MigrationTestBase::postMigration()
- BaseFieldMigrationTest::test in modules/
lightning_scheduler/ tests/ src/ Functional/ BaseFieldMigrationTest.php - PurgeTest::test in modules/
lightning_scheduler/ tests/ src/ Functional/ PurgeTest.php
File
- modules/
lightning_scheduler/ tests/ src/ Functional/ MigrationTestBase.php, line 45
Class
Namespace
Drupal\Tests\lightning_scheduler\FunctionalCode
protected function postMigration($entity_type_id) {
// Now that a migration is completed, old base fields will no longer be
// defined. Therefore, we need to clear the entity field cache in order to
// properly load the changed content, and there should be pending entity
// definition updates (the old base fields need to be uninstalled).
$this->container
->get('entity_field.manager')
->clearCachedFieldDefinitions();
$this
->assertTrue($this->container
->get('entity.definition_update_manager')
->needsUpdates());
return $this->container
->get('entity_type.manager')
->getStorage($entity_type_id);
}