Skip to content

Commit

Permalink
MAGETWO-54935: [Github #1931] Cancellation of element removal in layo…
Browse files Browse the repository at this point in the history
…uts doesn't work

-- integration test
  • Loading branch information
Karpenko, Oleksandr committed Oct 18, 2016
1 parent f1d7757 commit d99ed05
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<layout>
<container name="container1" label="Container 1">
<block class="Magento\Framework\View\Element\Text" name="no_name2"/>
</container>
<referenceContainer name="container1" remove="true"/>
<referenceBlock name="child_block1" remove="true"/>
<block class="Magento\Framework\View\Element\Text" name="block_container" as="block.container">
<block class="Magento\Framework\View\Element\Text" name="child_block1"/>
<block class="Magento\Framework\View\Element\Text" name="child_block2"/>
</block>
<referenceContainer name="not_exist" remove="false"/>
<referenceContainer name="container1" remove="false"/>
<referenceBlock name="child_block1" remove="false"/>
</layout>

0 comments on commit d99ed05

Please sign in to comment.