You are here

public function ContentModerationStateTest::testTaxonomyTermEntityTypeModeration in Drupal 9

Tests that the 'taxonomy_term' entity type cannot be moderated.

File

core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php, line 794

Class

ContentModerationStateTest
Tests links between a content entity and a content_moderation_state entity.

Namespace

Drupal\Tests\content_moderation\Kernel

Code

public function testTaxonomyTermEntityTypeModeration() {

  /** @var \Drupal\content_moderation\ModerationInformationInterface $moderation_info */
  $moderation_info = \Drupal::service('content_moderation.moderation_information');
  $entity_type = \Drupal::entityTypeManager()
    ->getDefinition('taxonomy_term');
  $this
    ->assertFalse($moderation_info
    ->canModerateEntitiesOfEntityType($entity_type));
}