function EntityDisplayBaseTest::testGetMode

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

@covers ::getMode

File

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

Class

EntityDisplayBaseTest
@coversDefaultClass \Drupal\Core\Entity\EntityDisplayBase

Namespace

Drupal\Tests\Core\Config\Entity

Code

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

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