function EntityTypeInfoTest::testEntityTypeAlter
Same name and namespace in other branches
- 9 core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php \Drupal\Tests\content_moderation\Kernel\EntityTypeInfoTest::testEntityTypeAlter()
- 10 core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php \Drupal\Tests\content_moderation\Kernel\EntityTypeInfoTest::testEntityTypeAlter()
- 11.x core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php \Drupal\Tests\content_moderation\Kernel\EntityTypeInfoTest::testEntityTypeAlter()
Test 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 <a href="/api/drupal/core%21modules%21content_moderation%21src%21EntityTypeInfo.php/class/EntityTypeInfo/8.9.x" title="Manipulates entity type information." class="local">\Drupal\content_moderation\EntityTypeInfo</a>
Namespace
Drupal\Tests\content_moderation\KernelCode
public function testEntityTypeAlter($entity_type_id, $moderatable) {
$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.