You are here

public function EntityDisplayBaseTest::testGetMode in Drupal 9

Same name and namespace in other branches
  1. 8 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 28

Class

EntityDisplayBaseTest
@coversDefaultClass \Drupal\Core\Entity\EntityDisplayBase

Namespace

Drupal\Tests\Core\Config\Entity

Code

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