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
Namespace
Drupal\Tests\content_moderation\KernelCode
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.