// Run the update and ensure the revision table is created.
$this->
updateEntityTypeToRevisionable(TRUE
);
$this->
assertTrue($this->database->
schema()->
tableExists('entity_test_update_revision'
), 'Revision table created for entity_test_update.'
);
} /**
* Tests updating entity schema when there are entity storage changes.
*/
public function testEntityTypeUpdateWithEntityStorageChange() { // Update the entity type to be revisionable and try to apply the update.
// It's expected to throw an exception.
$entity_type =
$this->
getUpdatedEntityTypeDefinition(TRUE, FALSE
);
try { $this->entityDefinitionUpdateManager->
updateEntityType($entity_type);
$this->
fail('EntityStorageException thrown when trying to apply an update that requires shared table schema changes.'
);
} catch (EntityStorageException
$e) { // Expected exception; just continue testing.
} } /**
* Tests installing an additional base field while installing an entity type.
*
* @covers ::installFieldableEntityType
*/