Skip to content
Snippets Groups Projects
Commit d99ed053 authored by Karpenko, Oleksandr's avatar Karpenko, Oleksandr
Browse files

MAGETWO-54935: [Github #1931] Cancellation of element removal in layouts doesn't work

-- integration test
parent f1d7757c
Branches
Tags
No related merge requests found
...@@ -198,6 +198,18 @@ class LayoutDirectivesTest extends \PHPUnit_Framework_TestCase ...@@ -198,6 +198,18 @@ class LayoutDirectivesTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($layout->isBlock('child_block2')); $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 * @magentoAppIsolation enabled
*/ */
......
<?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% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment