Exemplo n.º 1
0
 /**
  * @param array $elements
  * @return void
  * @dataProvider importExportElementsDataProvider
  */
 public function testConstructImportExportElements($elements)
 {
     $this->assertSame([], $this->_structure->exportElements());
     $this->_structure->importElements($elements);
     $this->assertSame($elements, $this->_structure->exportElements());
     $structure = new \Magento\Framework\Data\Structure($elements);
     $this->assertSame($elements, $structure->exportElements());
 }
Exemplo n.º 2
0
 public function testConstructorStructure()
 {
     $structure = new \Magento\Framework\Data\Structure();
     $structure->createElement('test.container', array());
     /** @var $layout \Magento\Framework\View\LayoutInterface */
     $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Framework\\View\\Layout', array('structure' => $structure));
     $this->assertTrue($layout->hasElement('test.container'));
 }