$entity_types =
$this->entityTypeManager->
getDefinitions();
$this->
assertTrue(isset($entity_types[$entity_type_id]), 'The "entity_test_new" entity type exists.'
);
$this->
assertTrue($schema->
tableExists($entity_type_id), 'Schema for the "entity_test_new" entity type has been created.'
);
} /**
* Tests when no definition update is needed.
*/
public function testNoUpdates() { // Ensure that the definition update manager reports no updates.
$this->
assertFalse($this->entityDefinitionUpdateManager->
needsUpdates(), 'EntityDefinitionUpdateManager reports that no updates are needed.'
);
$this->
assertSame([],
$this->entityDefinitionUpdateManager->
getChangeSummary(), 'EntityDefinitionUpdateManager reports an empty change summary.'
);
$this->
assertSame([],
$this->entityDefinitionUpdateManager->
getChangeList(), 'EntityDefinitionUpdateManager reports an empty change list.'
);
} /**
* Tests updating entity schema when there are no existing entities.
*/
public function testEntityTypeUpdateWithoutData() { // The 'entity_test_update' entity type starts out non-revisionable, so
// ensure the revision table hasn't been created during setUp().
$this->
assertFalse($this->database->
schema()->
tableExists('entity_test_update_revision'
), 'Revision table not created for entity_test_update.'
);