You are here

public function EntityTypeInfoTest::testEntityTypeAlter in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php \Drupal\Tests\content_moderation\Kernel\EntityTypeInfoTest::testEntityTypeAlter()

Tests the correct entity types have moderation added.

@covers ::entityTypeAlter

@dataProvider providerTestEntityTypeAlter

File

core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php, line 87

Class

EntityTypeInfoTest
@coversDefaultClass \Drupal\content_moderation\EntityTypeInfo

Namespace

Drupal\Tests\content_moderation\Kernel

Code

public function testEntityTypeAlter($entity_type_id, $moderatable) {
  $entity_types = $this->entityTypeManager
    ->getDefinitions();
  $this
    ->assertSame($moderatable, $entity_types[$entity_type_id]
    ->hasHandlerClass('moderation'));
}