public function ContentModerationStateTest::testContentModerationStateDataRemoval in Drupal 9
Same name and namespace in other branches
- 8 core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationStateTest::testContentModerationStateDataRemoval()
Tests removal of content moderation state entity.
@dataProvider basicModerationTestCases
File
- core/
modules/ content_moderation/ tests/ src/ Kernel/ ContentModerationStateTest.php, line 183
Class
- ContentModerationStateTest
- Tests links between a content entity and a content_moderation_state entity.
Namespace
Drupal\Tests\content_moderation\KernelCode
public function testContentModerationStateDataRemoval($entity_type_id) {
/** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
$entity = $this
->createEntity($entity_type_id);
$entity = $this
->reloadEntity($entity);
$entity
->delete();
$content_moderation_state = ContentModerationState::loadFromModeratedEntity($entity);
$this
->assertNull($content_moderation_state);
}