File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
dev/tests/integration/testsuite/Magento/Framework/View Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 7
7
*/
8
8
namespace Magento \Framework \View ;
9
9
10
- use Magento \Framework \View \ Layout \ BuilderFactory ;
10
+ use Magento \Framework \App \ State ;
11
11
12
12
class LayoutDirectivesTest extends \PHPUnit_Framework_TestCase
13
13
{
@@ -26,10 +26,16 @@ class LayoutDirectivesTest extends \PHPUnit_Framework_TestCase
26
26
*/
27
27
protected $ objectManager ;
28
28
29
+ /**
30
+ * @var \Magento\Framework\App\State
31
+ */
32
+ protected $ state ;
33
+
29
34
protected function setUp ()
30
35
{
31
36
$ this ->objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
32
37
$ this ->layoutFactory = $ this ->objectManager ->get ('Magento\Framework\View\LayoutFactory ' );
38
+ $ this ->state = $ this ->objectManager ->get ('Magento\Framework\App\State ' );
33
39
}
34
40
35
41
/**
@@ -223,11 +229,11 @@ public function testMoveAliasBroken()
223
229
$ this ->_getLayoutModel ('move_alias_broken.xml ' );
224
230
}
225
231
226
- /**
227
- * @expectedException \OutOfBoundsException
228
- */
229
232
public function testRemoveBroken ()
230
233
{
234
+ if ($ this ->state ->getMode () === State::MODE_DEVELOPER ) {
235
+ $ this ->setExpectedException ('OutOfBoundsException ' );
236
+ }
231
237
$ this ->_getLayoutModel ('remove_broken.xml ' );
232
238
}
233
239
You can’t perform that action at this time.
0 commit comments