Commit 76cf704a authored by catch's avatar catch
Browse files

Issue #2403169 by alexpott: Static menu link override configuration is incorrectly named

parent 1c94124a
core.menu.static_menu_link_overrides:
menu_link.static.overrides:
type: mapping type: mapping
label: 'Menu link overrides' label: 'Static menu link overrides'
mapping: mapping:
definitions: definitions:
type: sequence type: sequence
......
...@@ -19,7 +19,7 @@ class StaticMenuLinkOverrides implements StaticMenuLinkOverridesInterface { ...@@ -19,7 +19,7 @@ class StaticMenuLinkOverrides implements StaticMenuLinkOverridesInterface {
* *
* @var string * @var string
*/ */
protected $configName = 'menu_link.static.overrides'; protected $configName = 'core.menu.static_menu_link_overrides';
/** /**
* The menu link overrides config object. * The menu link overrides config object.
......
...@@ -22,7 +22,7 @@ class StaticMenuLinkOverridesTest extends UnitTestCase { ...@@ -22,7 +22,7 @@ class StaticMenuLinkOverridesTest extends UnitTestCase {
* @covers ::__construct * @covers ::__construct
*/ */
public function testConstruct() { public function testConstruct() {
$config_factory = $this->getConfigFactoryStub(array('menu_link.static.overrides' => array())); $config_factory = $this->getConfigFactoryStub(array('core.menu.static_menu_link_overrides' => array()));
$static_override = new StaticMenuLinkOverrides($config_factory); $static_override = new StaticMenuLinkOverrides($config_factory);
$this->assertAttributeEquals($config_factory, 'configFactory', $static_override); $this->assertAttributeEquals($config_factory, 'configFactory', $static_override);
...@@ -37,7 +37,7 @@ public function testReload() { ...@@ -37,7 +37,7 @@ public function testReload() {
$config_factory = $this->getMock('Drupal\Core\Config\ConfigFactoryInterface'); $config_factory = $this->getMock('Drupal\Core\Config\ConfigFactoryInterface');
$config_factory->expects($this->at(0)) $config_factory->expects($this->at(0))
->method('reset') ->method('reset')
->with('menu_link.static.overrides'); ->with('core.menu.static_menu_link_overrides');
$static_override = new StaticMenuLinkOverrides($config_factory); $static_override = new StaticMenuLinkOverrides($config_factory);
...@@ -53,7 +53,7 @@ public function testReload() { ...@@ -53,7 +53,7 @@ public function testReload() {
* @covers ::getConfig * @covers ::getConfig
*/ */
public function testLoadOverride($overrides, $id, $expected) { public function testLoadOverride($overrides, $id, $expected) {
$config_factory = $this->getConfigFactoryStub(array('menu_link.static.overrides' => array('definitions' => $overrides))); $config_factory = $this->getConfigFactoryStub(array('core.menu.static_menu_link_overrides' => array('definitions' => $overrides)));
$static_override = new StaticMenuLinkOverrides($config_factory); $static_override = new StaticMenuLinkOverrides($config_factory);
$this->assertEquals($expected, $static_override->loadOverride($id)); $this->assertEquals($expected, $static_override->loadOverride($id));
...@@ -88,7 +88,7 @@ public function testLoadMultipleOverrides() { ...@@ -88,7 +88,7 @@ public function testLoadMultipleOverrides() {
$overrides['test2'] = array('parent' => 'test1'); $overrides['test2'] = array('parent' => 'test1');
$overrides['test1__la___ma'] = array('parent' => 'test2'); $overrides['test1__la___ma'] = array('parent' => 'test2');
$config_factory = $this->getConfigFactoryStub(array('menu_link.static.overrides' => array('definitions' => $overrides))); $config_factory = $this->getConfigFactoryStub(array('core.menu.static_menu_link_overrides' => array('definitions' => $overrides)));
$static_override = new StaticMenuLinkOverrides($config_factory); $static_override = new StaticMenuLinkOverrides($config_factory);
$this->assertEquals(array('test1' => array('parent' => 'test0'), 'test1.la__ma' => array('parent' => 'test2')), $static_override->loadMultipleOverrides(array('test1', 'test1.la__ma'))); $this->assertEquals(array('test1' => array('parent' => 'test0'), 'test1.la__ma' => array('parent' => 'test2')), $static_override->loadMultipleOverrides(array('test1', 'test1.la__ma')));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment