Skip to content

Commit dae56d5

Browse files
author
Bohdan Korablov
committed
MAGETWO-43793: [github] broken references when viewing admin after initial install #1795
1 parent 071e731 commit dae56d5

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

lib/internal/Magento/Framework/View/Test/Unit/Layout/Data/StructureTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
* Copyright © 2015 Magento. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
namespace Magento\Framework\View\Test\Unit\Layout\Data;
67

78
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
89
use Magento\Framework\App\State;
910

10-
class StructureTest extends PHPUnit_Framework_TestCase
11+
class StructureTest extends \PHPUnit_Framework_TestCase
1112
{
1213
/**
1314
* @var \Psr\Log\LoggerInterface|\PHPUnit_Framework_MockObject_MockObject
@@ -65,8 +66,10 @@ public function testReorderChildElementLog($loggerExpects, $stateMode)
6566

6667
$this->loggerMock->expects($loggerExpects)
6768
->method('critical')
68-
->with("Broken reference: the '{$childName}' tries to reorder itself towards '', but " .
69-
"their parents are different: '{$parentName}' and '' respectively.");
69+
->with(
70+
"Broken reference: the '{$childName}' tries to reorder itself towards '', but " .
71+
"their parents are different: '{$parentName}' and '' respectively."
72+
);
7073

7174
$this->dataStructure->reorderChildElement($parentName, $childName, $offsetOrSibling);
7275
}

lib/internal/Magento/Framework/View/Test/Unit/Layout/ScheduledStructure/HelperTest.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,10 @@ public function testScheduleElementLog($loggerExpects, $stateMode)
185185

186186
$this->loggerMock->expects($loggerExpects)
187187
->method('critical')
188-
->with("Broken reference: the '{$key}' element cannot be added as child to '{$parentName}', " .
189-
'because the latter doesn\'t exist');
188+
->with(
189+
"Broken reference: the '{$key}' element cannot be added as child to '{$parentName}', " .
190+
'because the latter doesn\'t exist'
191+
);
190192

191193
$this->helper->scheduleElement($this->scheduledStructureMock, $this->dataStructureMock, $key);
192194
}
@@ -259,7 +261,10 @@ public function testScheduleElement($hasParent, $setAsChild, $toRemoveList, $sib
259261
$this->scheduledStructureMock->expects($this->once())->method('setElement')->with($key, [$block, $data]);
260262

261263
$this->dataStructureMock->expects($this->once())->method('createElement')->with($key, ['type' => $block]);
262-
$this->dataStructureMock->expects($this->once())->method('hasElement')->with($parentName)->willReturn($hasParent);
264+
$this->dataStructureMock->expects($this->once())
265+
->method('hasElement')
266+
->with($parentName)
267+
->willReturn($hasParent);
263268
$this->dataStructureMock->expects($this->exactly($setAsChild))
264269
->method('setAsChild')
265270
->with($key, $parentName, $alias)

0 commit comments

Comments
 (0)