protected function EntityDefinitionTestTrait::enableNewEntityType 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::enableNewEntityType()
Enables a new entity type definition.
1 call to EntityDefinitionTestTrait::enableNewEntityType()
- EntityDefinitionUpdateTest::testNewEntityType in core/
modules/ system/ src/ Tests/ Entity/ EntityDefinitionUpdateTest.php - Tests that new entity type definitions are correctly handled.
File
- core/
modules/ system/ src/ Tests/ Entity/ EntityDefinitionTestTrait.php, line 21 - 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 enableNewEntityType() {
$this->state
->set('entity_test_new', TRUE);
$this->entityManager
->clearCachedDefinitions();
$this->entityDefinitionUpdateManager
->applyUpdates();
}