public function LocalTaskDefaultTest::testGetOptions in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php \Drupal\Tests\Core\Menu\LocalTaskDefaultTest::testGetOptions()
@covers ::getOptions
File
- core/
tests/ Drupal/ Tests/ Core/ Menu/ LocalTaskDefaultTest.php, line 278 - Contains \Drupal\Tests\Core\Menu\LocalTaskDefaultTest.
Class
- LocalTaskDefaultTest
- @coversDefaultClass \Drupal\Core\Menu\LocalTaskDefault @group Menu
Namespace
Drupal\Tests\Core\MenuCode
public function testGetOptions() {
$this->pluginDefinition['options'] = array(
'attributes' => array(
'class' => array(
'example',
),
),
);
$this
->setupLocalTaskDefault();
$route_match = new RouteMatch('', new Route('/'));
$this
->assertEquals($this->pluginDefinition['options'], $this->localTaskBase
->getOptions($route_match));
$this->localTaskBase
->setActive(TRUE);
$this
->assertEquals(array(
'attributes' => array(
'class' => array(
'example',
'is-active',
),
),
), $this->localTaskBase
->getOptions($route_match));
}