function EntityDefinitionTestTrait::deleteEntityType

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait::deleteEntityType()
  2. 8.9.x core/modules/system/src/Tests/Entity/EntityDefinitionTestTrait.php \Drupal\system\Tests\Entity\EntityDefinitionTestTrait::deleteEntityType()
  3. 8.9.x core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait::deleteEntityType()
  4. 11.x core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait::deleteEntityType()

Removes the entity type.

5 calls to EntityDefinitionTestTrait::deleteEntityType()
EntityDefinitionUpdateTest::testInstallFieldableEntityTypeWithoutInCodeDefinition in core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
Tests creating a fieldable entity type that doesn't exist in code anymore.
EntityDefinitionUpdateTest::testUninstallEntityTypeWithoutInCodeDefinition in core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
Tests uninstalling an entity type that doesn't exist in code anymore.
EntityDefinitionUpdateTest::testUninstallRevisionableEntityTypeWithoutInCodeDefinition in core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
Tests uninstalling a revisionable entity type that doesn't exist in code.
EntityDefinitionUpdateTest::testUpdateEntityTypeWithoutInCodeDefinition in core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
Tests updating an entity type that doesn't exist in code anymore.
EntityDefinitionUpdateTest::testUpdateFieldableEntityTypeWithoutInCodeDefinition in core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
Tests updating a fieldable entity type that doesn't exist in code anymore.

File

core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php, line 423

Class

EntityDefinitionTestTrait
Provides some test methods used to update existing entity definitions.

Namespace

Drupal\Tests\system\Functional\Entity\Traits

Code

protected function deleteEntityType() {
    $this->state
        ->set('entity_test_update.entity_type', 'null');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.