From d99ed053ab007ca6871f85cd5ea0b4669d91aa82 Mon Sep 17 00:00:00 2001 From: "Karpenko, Oleksandr" Date: Tue, 18 Oct 2016 12:54:13 +0300 Subject: [PATCH] MAGETWO-54935: [Github #1931] Cancellation of element removal in layouts doesn't work -- integration test --- .../Framework/View/LayoutDirectivesTest.php | 12 +++++++++++ .../remove_cancellation.xml | 21 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/remove_cancellation.xml diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/LayoutDirectivesTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutDirectivesTest.php index 7a20762bbe9d4..607ee4c919a62 100755 --- a/dev/tests/integration/testsuite/Magento/Framework/View/LayoutDirectivesTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutDirectivesTest.php @@ -198,6 +198,18 @@ public function testRemove() $this->assertTrue($layout->isBlock('child_block2')); } + /** + * @magentoAppIsolation enabled + */ + public function testRemoveCancellation() + { + $layout = $this->_getLayoutModel('remove_cancellation.xml'); + $this->assertTrue($layout->isContainer('container1')); + $this->assertTrue($layout->isBlock('child_block1')); + $this->assertTrue($layout->isBlock('no_name2')); + $this->assertFalse($layout->getBlock('not_exist')); + } + /** * @magentoAppIsolation enabled */ diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/remove_cancellation.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/remove_cancellation.xml new file mode 100644 index 0000000000000..ff086b19fd1b0 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/remove_cancellation.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + +