protected function MigrationTestBase::postMigration in Lightning Workflow 8.3
Same name and namespace in other branches
- 8.2 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 - Runs a basic test of migrating old Lightning Scheduler data.
- PurgeTest::test in modules/
lightning_scheduler/ tests/ src/ Functional/ PurgeTest.php - Runs a basic test of migrating old Lightning Scheduler data.
File
- modules/
lightning_scheduler/ tests/ src/ Functional/ MigrationTestBase.php, line 64
Class
- MigrationTestBase
- Base class for testing migration of old Lightning Scheduler data.
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);
}