/**
* Tests that views are disabled when an entity type is deleted.
*/
public function testDeleteEntityType() { $entity_storage =
$this->entityTypeManager->
getStorage('view'
);
// Make the test entity type revisionable.
$this->
updateEntityTypeToRevisionable(TRUE
);
$views =
$entity_storage->
loadMultiple();
// Ensure that all test views exists.
$this->
assertTrue(isset($views['test_view_entity_test'
]));
$this->
assertTrue(isset($views['test_view_entity_test_revision'
]));
$this->
assertTrue(isset($views['test_view_entity_test_data'
]));
$this->
assertTrue(isset($views['test_view_entity_test_additional_base_field'
]));
$event =
new EntityTypeEvent($this->entityTypeManager->
getDefinition('entity_test_update'
));
$this->eventDispatcher->
dispatch($event, EntityTypeEvents::DELETE
);
// We expect that views which use 'entity_test_update' as base tables are