function EntityDisplayBaseTest::testGetMode
Same name and namespace in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php \Drupal\Tests\Core\Config\Entity\EntityDisplayBaseTest::testGetMode()
- 10 core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php \Drupal\Tests\Core\Config\Entity\EntityDisplayBaseTest::testGetMode()
- 11.x 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 <a href="/api/drupal/core%21lib%21Drupal%21Core%21Entity%21EntityDisplayBase.php/class/EntityDisplayBase/9" title="Provides a common base class for entity view and form displays." class="local">\Drupal\Core\Entity\EntityDisplayBase</a>
Namespace
Drupal\Tests\Core\Config\EntityCode
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());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.