function EntityDisplayBaseTest::testSetTargetBundle

@covers ::setTargetBundle

File

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

Class

EntityDisplayBaseTest
@coversDefaultClass \Drupal\Core\Entity\EntityDisplayBase[[api-linebreak]]

Namespace

Drupal\Tests\Core\Config\Entity

Code

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

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