public function LingotekProfileEntityIdUpdate8002Test::testConfigEntityMetadataUpdate8001 in Lingotek Translation 8.2
Tests that the entity definition is loaded correctly.
File
- tests/
src/ Functional/ Update/ LingotekProfileEntityIdUpdate8002Test.php, line 27
Class
- LingotekProfileEntityIdUpdate8002Test
- Tests the upgrade path for changing the profile entity id.
Namespace
Drupal\Tests\lingotek\Functional\UpdateCode
public function testConfigEntityMetadataUpdate8001() {
$this
->runUpdates();
// The lingotek_profile entity exists, but not the profile one.
$entity_type = \Drupal::entityTypeManager()
->getDefinition('profile', FALSE);
$this
->assertNull($entity_type);
$entity_type = \Drupal::entityTypeManager()
->getDefinition('lingotek_profile', FALSE);
$this
->assertNotNull($entity_type
->id());
// Load a profile, it should work.
$profile = LingotekProfile::load('automatic');
$this
->assertNotNull($profile
->id());
}