function EntityDisplayBaseTest::testGetTargetBundle

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

Tests get target bundle.

File

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

Class

EntityDisplayBaseTest
Tests Drupal\Core\Entity\EntityDisplayBase.

Namespace

Drupal\Tests\Core\Config\Entity

Code

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

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