// 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
// disabled.
$views =
$entity_storage->
loadMultiple();
// Ensure that all test views still exists after the deletion of the
// entity type.
$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'
]));