function EntityTypeInfoTest::testEntityTypeAlter

Tests the correct entity types have moderation added.

@legacy-covers ::entityTypeAlter

Attributes

#[DataProvider('providerTestEntityTypeAlter')]

File

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

Class

EntityTypeInfoTest
Tests Drupal\content_moderation\EntityTypeInfo.

Namespace

Drupal\Tests\content_moderation\Kernel

Code

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

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