Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit e4472e2

Browse files
author
Oleksii Korshenko
committed
MAGETWO-66875: Remove the copyright year from file headers #8648
- fixed merge conflict
1 parent 89f57c8 commit e4472e2

File tree

1 file changed

+0
-133
lines changed

1 file changed

+0
-133
lines changed

app/code/Magento/Config/Test/Unit/Model/Config/StructureTest.php

-133
Original file line numberDiff line numberDiff line change
@@ -52,48 +52,6 @@ class StructureTest extends \PHPUnit_Framework_TestCase
5252

5353
protected function setUp()
5454
{
55-
<<<<<<< HEAD
56-
$this->_flyweightFactory = $this->getMock(
57-
\Magento\Config\Model\Config\Structure\Element\FlyweightFactory::class,
58-
[],
59-
[],
60-
'',
61-
false
62-
);
63-
$this->_tabIteratorMock = $this->getMock(
64-
\Magento\Config\Model\Config\Structure\Element\Iterator\Tab::class,
65-
[],
66-
[],
67-
'',
68-
false
69-
);
70-
$this->_structureDataMock = $this->getMock(
71-
\Magento\Config\Model\Config\Structure\Data::class,
72-
[],
73-
[],
74-
'',
75-
false
76-
);
77-
$this->_scopeDefinerMock = $this->getMock(
78-
\Magento\Config\Model\Config\ScopeDefiner::class,
79-
[],
80-
[],
81-
'',
82-
false
83-
);
84-
$this->_scopeDefinerMock->expects($this->any())->method('getScope')->will($this->returnValue('scope'));
85-
86-
$filePath = dirname(__DIR__) . '/_files';
87-
$this->_structureData = require $filePath . '/converted_config.php';
88-
$this->_structureDataMock->expects(
89-
$this->once()
90-
)->method(
91-
'get'
92-
)->will(
93-
$this->returnValue($this->_structureData['config']['system'])
94-
);
95-
$this->_model = new \Magento\Config\Model\Config\Structure(
96-
=======
9755
$this->_flyweightFactory = $this->getMockBuilder(FlyweightFactory::class)
9856
->disableOriginalConstructor()
9957
->getMock();
@@ -117,7 +75,6 @@ protected function setUp()
11775
->willReturn($this->_structureData['config']['system']);
11876

11977
$this->_model = new Structure(
120-
>>>>>>> mainline/develop
12178
$this->_structureDataMock,
12279
$this->_tabIteratorMock,
12380
$this->_flyweightFactory,
@@ -127,25 +84,6 @@ protected function setUp()
12784

12885
public function testGetTabsBuildsSectionTree()
12986
{
130-
<<<<<<< HEAD
131-
$this->_structureDataMock = $this->getMock(
132-
\Magento\Config\Model\Config\Structure\Data::class,
133-
[],
134-
[],
135-
'',
136-
false
137-
);
138-
$this->_structureDataMock->expects(
139-
$this->any()
140-
)->method(
141-
'get'
142-
)->will(
143-
$this->returnValue(
144-
['sections' => ['section1' => ['tab' => 'tab1']], 'tabs' => ['tab1' => []]]
145-
)
146-
);
147-
=======
148-
>>>>>>> mainline/develop
14987
$expected = ['tab1' => ['children' => ['section1' => ['tab' => 'tab1']]]];
15088

15189
$this->_structureDataMock = $this->getMockBuilder(Data::class)
@@ -172,21 +110,6 @@ public function testGetTabsBuildsSectionTree()
172110

173111
public function testGetSectionList()
174112
{
175-
<<<<<<< HEAD
176-
$this->_structureDataMock = $this->getMock(
177-
\Magento\Config\Model\Config\Structure\Data::class,
178-
[],
179-
[],
180-
'',
181-
false
182-
);
183-
$this->_structureDataMock->expects(
184-
$this->any()
185-
)->method(
186-
'get'
187-
)->will(
188-
$this->returnValue(
189-
=======
190113
$expected = [
191114
'section1_child_id_1' => true,
192115
'section1_child_id_2' => true,
@@ -200,7 +123,6 @@ public function testGetSectionList()
200123
$this->_structureDataMock->expects($this->any())
201124
->method('get')
202125
->willReturn(
203-
>>>>>>> mainline/develop
204126
[
205127
'sections' => [
206128
'section1' => [
@@ -269,16 +191,6 @@ public function emptyElementDataProvider()
269191

270192
public function testGetElementReturnsProperElementByPath()
271193
{
272-
<<<<<<< HEAD
273-
$elementMock = $this->getMock(
274-
\Magento\Config\Model\Config\Structure\Element\Field::class,
275-
[],
276-
[],
277-
'',
278-
false
279-
);
280-
=======
281-
>>>>>>> mainline/develop
282194
$section = $this->_structureData['config']['system']['sections']['section_1'];
283195
$fieldData = $section['children']['group_level_1']['children']['field_3'];
284196

@@ -299,39 +211,19 @@ public function testGetElementReturnsProperElementByPath()
299211

300212
public function testGetElementByPathPartsIfSectionDataIsEmpty()
301213
{
302-
<<<<<<< HEAD
303-
$elementMock = $this->getMock(
304-
\Magento\Config\Model\Config\Structure\Element\Field::class,
305-
[],
306-
[],
307-
'',
308-
false
309-
);
310-
=======
311-
>>>>>>> mainline/develop
312214
$fieldData = [
313215
'id' => 'field_3',
314216
'path' => 'section_1/group_level_1',
315217
'_elementType' => 'field',
316218
];
317219
$pathParts = explode('/', 'section_1/group_level_1/field_3');
318220

319-
<<<<<<< HEAD
320-
$structureDataMock = $this->getMock(
321-
\Magento\Config\Model\Config\Structure\Data::class,
322-
[],
323-
[],
324-
'',
325-
false
326-
);
327-
=======
328221
$elementMock = $this->getMockBuilder(Structure\Element\Field::class)
329222
->disableOriginalConstructor()
330223
->getMock();
331224
$structureDataMock = $this->getMockBuilder(Data::class)
332225
->disableOriginalConstructor()
333226
->getMock();
334-
>>>>>>> mainline/develop
335227

336228
$elementMock->expects($this->once())
337229
->method('setData')
@@ -356,20 +248,6 @@ public function testGetElementByPathPartsIfSectionDataIsEmpty()
356248

357249
public function testGetFirstSectionReturnsFirstAllowedSection()
358250
{
359-
<<<<<<< HEAD
360-
$tabMock = $this->getMock(
361-
\Magento\Config\Model\Config\Structure\Element\Tab::class,
362-
['current', 'getChildren', 'rewind'],
363-
[],
364-
'',
365-
false
366-
);
367-
$tabMock->expects($this->any())->method('getChildren')->will($this->returnSelf());
368-
$tabMock->expects($this->once())->method('rewind');
369-
$tabMock->expects($this->once())->method('current')->will($this->returnValue('currentSection'));
370-
$this->_tabIteratorMock->expects($this->once())->method('rewind');
371-
$this->_tabIteratorMock->expects($this->once())->method('current')->will($this->returnValue($tabMock));
372-
=======
373251
$tabMock = $this->getMockBuilder(Structure\Element\Tab::class)
374252
->disableOriginalConstructor()
375253
->setMethods(['current', 'getChildren', 'rewind'])
@@ -389,22 +267,11 @@ public function testGetFirstSectionReturnsFirstAllowedSection()
389267
->method('current')
390268
->willReturn($tabMock);
391269

392-
>>>>>>> mainline/develop
393270
$this->assertEquals('currentSection', $this->_model->getFirstSection());
394271
}
395272

396273
public function testGetElementReturnsProperElementByPathCachesObject()
397274
{
398-
<<<<<<< HEAD
399-
$elementMock = $this->getMock(
400-
\Magento\Config\Model\Config\Structure\Element\Field::class,
401-
[],
402-
[],
403-
'',
404-
false
405-
);
406-
=======
407-
>>>>>>> mainline/develop
408275
$section = $this->_structureData['config']['system']['sections']['section_1'];
409276
$fieldData = $section['children']['group_level_1']['children']['field_3'];
410277

0 commit comments

Comments
 (0)