public function StaticMenuLinkOverridesTest::testLoadOverride in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php \Drupal\Tests\Core\Menu\StaticMenuLinkOverridesTest::testLoadOverride()
Tests the loadOverride method.
@dataProvider providerTestLoadOverride
@covers ::loadOverride @covers ::getConfig
File
- core/
tests/ Drupal/ Tests/ Core/ Menu/ StaticMenuLinkOverridesTest.php, line 55 - Contains \Drupal\Tests\Core\Menu\StaticMenuLinkOverridesTest.
Class
- StaticMenuLinkOverridesTest
- @coversDefaultClass \Drupal\Core\Menu\StaticMenuLinkOverrides @group Menu
Namespace
Drupal\Tests\Core\MenuCode
public function testLoadOverride($overrides, $id, $expected) {
$config_factory = $this
->getConfigFactoryStub(array(
'core.menu.static_menu_link_overrides' => array(
'definitions' => $overrides,
),
));
$static_override = new StaticMenuLinkOverrides($config_factory);
$this
->assertEquals($expected, $static_override
->loadOverride($id));
}