function EntityDisplayBaseTest::testGetTargetEntityTypeId

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php \Drupal\Tests\Core\Config\Entity\EntityDisplayBaseTest::testGetTargetEntityTypeId()
  2. 9 core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php \Drupal\Tests\Core\Config\Entity\EntityDisplayBaseTest::testGetTargetEntityTypeId()
  3. 8.9.x core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php \Drupal\Tests\Core\Config\Entity\EntityDisplayBaseTest::testGetTargetEntityTypeId()
  4. main core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php \Drupal\Tests\Core\Config\Entity\EntityDisplayBaseTest::testGetTargetEntityTypeId()

Tests get target entity type id.

File

core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php, line 41

Class

EntityDisplayBaseTest
Tests Drupal\Core\Entity\EntityDisplayBase.

Namespace

Drupal\Tests\Core\Config\Entity

Code

public function testGetTargetEntityTypeId() : void {
  $reflection = new \ReflectionProperty($this->entityDisplay, 'targetEntityType');
  $reflection->setValue($this->entityDisplay, 'test');
  $this->assertEquals('test', $this->entityDisplay
    ->getTargetEntityTypeId());
}

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