protected function EntityDefinitionTestTrait::updateEntityTypeToNotRevisionable in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/src/Tests/Entity/EntityDefinitionTestTrait.php \Drupal\system\Tests\Entity\EntityDefinitionTestTrait::updateEntityTypeToNotRevisionable()
Updates the 'entity_test_update' entity type not revisionable.
2 calls to EntityDefinitionTestTrait::updateEntityTypeToNotRevisionable()
- ViewsEntitySchemaSubscriberIntegrationTest::testRevisionDisabling in core/
modules/ views/ src/ Tests/ EventSubscriber/ ViewsEntitySchemaSubscriberIntegrationTest.php - Tests that removing revision support disables the view.
- ViewsEntitySchemaSubscriberIntegrationTest::testVariousTableUpdates in core/
modules/ views/ src/ Tests/ EventSubscriber/ ViewsEntitySchemaSubscriberIntegrationTest.php - Tests a bunch possible entity definition table updates.
File
- core/
modules/ system/ src/ Tests/ Entity/ EntityDefinitionTestTrait.php, line 52 - Contains \Drupal\system\Tests\Entity\EntityDefinitionTestTrait.
Class
- EntityDefinitionTestTrait
- Provides some test methods used to update existing entity definitions.
Namespace
Drupal\system\Tests\EntityCode
protected function updateEntityTypeToNotRevisionable() {
$entity_type = clone $this->entityManager
->getDefinition('entity_test_update');
$keys = $entity_type
->getKeys();
unset($keys['revision']);
$entity_type
->set('entity_keys', $keys);
$this->state
->set('entity_test_update.entity_type', $entity_type);
}