Skip to content

Commit 73c6ab0

Browse files
author
Yuri Kovsher
committed
MAGETWO-36563: Fatal error in integration tests when xdebug is enabled
1 parent 63fa495 commit 73c6ab0

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

lib/internal/Magento/Framework/View/Test/Unit/LayoutTest.php

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ class LayoutTest extends \PHPUnit_Framework_TestCase
8686
*/
8787
protected $generatorContextFactoryMock;
8888

89+
/**
90+
* @var \Magento\Framework\App\State|\PHPUnit_Framework_MockObject_MockObject
91+
*/
92+
protected $appStateMock;
93+
94+
/**
95+
* @var \Psr\Log\LoggerInterface|\PHPUnit_Framework_MockObject_MockObject
96+
*/
97+
protected $loggerMock;
98+
8999
protected function setUp()
90100
{
91101
$this->structureMock = $this->getMockBuilder('Magento\Framework\View\Layout\Data\Structure')
@@ -136,8 +146,14 @@ protected function setUp()
136146
->getMock();
137147
$this->generatorContextFactoryMock = $this->getMockBuilder(
138148
'Magento\Framework\View\Layout\Generator\ContextFactory'
139-
)->disableOriginalConstructor()
140-
->getMock();
149+
)
150+
->disableOriginalConstructor()
151+
->getMock();
152+
$this->appStateMock = $this->getMockBuilder('Magento\Framework\App\State')
153+
->disableOriginalConstructor()
154+
->getMock();
155+
$this->loggerMock = $this->getMockBuilder('Psr\Log\LoggerInterface')
156+
->getMock();
141157

142158
$this->model = new \Magento\Framework\View\Layout(
143159
$this->processorFactoryMock,
@@ -150,6 +166,8 @@ protected function setUp()
150166
$this->cacheMock,
151167
$this->readerContextFactoryMock,
152168
$this->generatorContextFactoryMock,
169+
$this->appStateMock,
170+
$this->loggerMock,
153171
true
154172
);
155173
}

0 commit comments

Comments
 (0)