File tree 2 files changed +33
-0
lines changed
dev/tests/integration/testsuite/Magento/Framework/View
_files/layout_directives_test
2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,18 @@ public function testRemove()
198
198
$ this ->assertTrue ($ layout ->isBlock ('child_block2 ' ));
199
199
}
200
200
201
+ /**
202
+ * @magentoAppIsolation enabled
203
+ */
204
+ public function testRemoveCancellation ()
205
+ {
206
+ $ layout = $ this ->_getLayoutModel ('remove_cancellation.xml ' );
207
+ $ this ->assertTrue ($ layout ->isContainer ('container1 ' ));
208
+ $ this ->assertTrue ($ layout ->isBlock ('child_block1 ' ));
209
+ $ this ->assertTrue ($ layout ->isBlock ('no_name2 ' ));
210
+ $ this ->assertFalse ($ layout ->getBlock ('not_exist ' ));
211
+ }
212
+
201
213
/**
202
214
* @magentoAppIsolation enabled
203
215
*/
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <!--
3
+ /**
4
+ * Copyright © 2016 Magento. All rights reserved.
5
+ * See COPYING.txt for license details.
6
+ */
7
+ -->
8
+ <layout >
9
+ <container name =" container1" label =" Container 1" >
10
+ <block class =" Magento\Framework\View\Element\Text" name =" no_name2" />
11
+ </container >
12
+ <referenceContainer name =" container1" remove =" true" />
13
+ <referenceBlock name =" child_block1" remove =" true" />
14
+ <block class =" Magento\Framework\View\Element\Text" name =" block_container" as =" block.container" >
15
+ <block class =" Magento\Framework\View\Element\Text" name =" child_block1" />
16
+ <block class =" Magento\Framework\View\Element\Text" name =" child_block2" />
17
+ </block >
18
+ <referenceContainer name =" not_exist" remove =" false" />
19
+ <referenceContainer name =" container1" remove =" false" />
20
+ <referenceBlock name =" child_block1" remove =" false" />
21
+ </layout >
You can’t perform that action at this time.
0 commit comments