function EntityTypeInfoTest::testEntityBaseFieldProvider

Same name and namespace in other branches
  1. 9 core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php \Drupal\Tests\content_moderation\Kernel\EntityTypeInfoTest::testEntityBaseFieldProvider()
  2. 10 core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php \Drupal\Tests\content_moderation\Kernel\EntityTypeInfoTest::testEntityBaseFieldProvider()
  3. 11.x core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php \Drupal\Tests\content_moderation\Kernel\EntityTypeInfoTest::testEntityBaseFieldProvider()

Test entity base field provider.

File

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

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\Kernel

Code

public function testEntityBaseFieldProvider() {
    $this->enableModeration('entity_test_mulrev', 'entity_test_mulrev');
    $this->container
        ->get('state')
        ->set('entity_test.field_test_item', TRUE);
    $field_definitions = $this->entityFieldManager
        ->getFieldDefinitions('entity_test_mulrev', 'entity_test_mulrev');
    $this->assertEquals('entity_test', $field_definitions['field_test_item']->getProvider());
}

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