function EntityDisplayBaseTest::testGetTargetEntityTypeId

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

@covers ::getTargetEntityTypeId

File

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

Class

EntityDisplayBaseTest
@coversDefaultClass \Drupal\Core\Entity\EntityDisplayBase

Namespace

Drupal\Tests\Core\Config\Entity

Code

public function testGetTargetEntityTypeId() {
    $mock = $this->getMockForAbstractClass('\\Drupal\\Core\\Entity\\EntityDisplayBase', [], '', FALSE);
    $reflection = new \ReflectionProperty($mock, 'targetEntityType');
    $reflection->setAccessible(TRUE);
    $reflection->setValue($mock, 'test');
    $this->assertEquals('test', $mock->getTargetEntityTypeId());
}

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