function TopBarItemManagerTest::testGetDefinitionsByRegion
@covers ::getDefinitionsByRegion
File
-
core/
modules/ navigation/ tests/ src/ Unit/ TopBarItemManagerTest.php, line 84
Class
- TopBarItemManagerTest
- @coversDefaultClass \Drupal\navigation\TopBarItemManager
Namespace
Drupal\Tests\navigation\UnitCode
public function testGetDefinitionsByRegion() : void {
$tools = $this->manager
->getDefinitionsByRegion(TopBarRegion::Tools);
$this->assertSame([
'tools',
], array_keys($tools));
$context = $this->manager
->getDefinitionsByRegion(TopBarRegion::Context);
$this->assertSame([
'context',
], array_keys($context));
$actions = $this->manager
->getDefinitionsByRegion(TopBarRegion::Actions);
$this->assertSame([
'actions',
'more_actions',
], array_keys($actions));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.