17 $this->_sut = new \Magento\Config\Model\Config\Structure\Mapper\ExtendsMapper(
27 public function testMap($sourceData, $resultData)
29 $this->assertEquals($resultData, $this->_sut->map($sourceData));
34 $this->expectException(
'InvalidArgumentException');
35 $this->expectExceptionMessage(
'Invalid path in extends attribute of config/system/sections/section1 node');
38 'system' => [
'sections' => [
'section1' => [
'extends' =>
'nonExistentSection2']]],
42 $this->_sut->map($sourceData);
64 $data = [
'config' => [
'system' => [
'sections' =>
'some_non_array']]];
78 'section1' => [
'children' => [
'child1',
'child2',
'child3']],
79 'section2' => [
'extends' =>
'section1'],
85 $result[
'config'][
'system'][
'sections'][
'section2'][
'children'] =
86 $source[
'config'][
'system'][
'sections'][
'section1'][
'children'];
105 'subchild2' => [
'extends' =>
'*/child2'],
108 'child2' => [
'some' =>
'Data',
'for' =>
'node',
'being' =>
'extended'],
117 $result[
'config'][
'system'][
'sections'][
'section1'][
'children'][
'child1'][
'children'][
'subchild2'][
'some'] =
119 $result[
'config'][
'system'][
'sections'][
'section1'][
'children'][
'child1'][
'children'][
'subchild2'][
'for'] =
121 $result[
'config'][
'system'][
'sections'][
'section1'][
'children'][
'child1'][
'children'][
'subchild2'][
'being'] =
138 'children' => [
'child1' => 1,
'child2' => 2,
'child3' => 3],
141 'extends' =>
'section1',
143 'children' => [
'child4' => 4,
'child5' => 5,
'child1' => 6],
150 $section2 = &
$result[
'config'][
'system'][
'sections'][
'section2'];
151 $section2[
'children'] = [
'child4' => 4,
'child5' => 5,
'child1' => 6,
'child2' => 2,
'child3' => 3];
_extendFromNodeOnHigherLevelData()
testMap($sourceData, $resultData)
_extendFromASiblingData()