Skip to content

Commit 1ce0880

Browse files
author
Yuri Kovsher
committed
Merge remote-tracking branch 'tango-ce/MAGETWO-36572' into MAGETWO-37436
2 parents f8e5720 + f400b1f commit 1ce0880

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

dev/tests/integration/testsuite/Magento/Framework/View/LayoutDirectivesTest.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
namespace Magento\Framework\View;
99

10-
use Magento\Framework\View\Layout\BuilderFactory;
10+
use Magento\Framework\App\State;
1111

1212
class LayoutDirectivesTest extends \PHPUnit_Framework_TestCase
1313
{
@@ -26,10 +26,16 @@ class LayoutDirectivesTest extends \PHPUnit_Framework_TestCase
2626
*/
2727
protected $objectManager;
2828

29+
/**
30+
* @var \Magento\Framework\App\State
31+
*/
32+
protected $state;
33+
2934
protected function setUp()
3035
{
3136
$this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
3237
$this->layoutFactory = $this->objectManager->get('Magento\Framework\View\LayoutFactory');
38+
$this->state = $this->objectManager->get('Magento\Framework\App\State');
3339
}
3440

3541
/**
@@ -223,11 +229,11 @@ public function testMoveAliasBroken()
223229
$this->_getLayoutModel('move_alias_broken.xml');
224230
}
225231

226-
/**
227-
* @expectedException \OutOfBoundsException
228-
*/
229232
public function testRemoveBroken()
230233
{
234+
if ($this->state->getMode() === State::MODE_DEVELOPER) {
235+
$this->setExpectedException('OutOfBoundsException');
236+
}
231237
$this->_getLayoutModel('remove_broken.xml');
232238
}
233239

0 commit comments

Comments
 (0)