public function testLoadOverride($overrides,
$id,
$expected) { $config_factory =
$this->
getConfigFactoryStub(['core.menu.static_menu_link_overrides' =>
['definitions' =>
$overrides]]);
$static_override =
new StaticMenuLinkOverrides($config_factory);
$this->
assertEquals($expected,
$static_override->
loadOverride($id));
} /**
* Provides test data for testLoadOverride.
*/
public function providerTestLoadOverride() { $data =
[];
// Valid ID.
$data[] =
[['test1' =>
['parent' => 'test0'
]], 'test1',
['parent' => 'test0'
]];
// Non existing ID.
$data[] =
[['test1' =>
['parent' => 'test0'
]], 'test2',
[]];