Exemplo n.º 1
0
 /**
  * @return void
  */
 public function testUnsetChild()
 {
     $this->_populateSampleStructure();
     // specify element by name
     $this->_structure->unsetChild('five');
     $this->assertFalse($this->_structure->getParentId('five'));
     $this->assertArrayNotHasKey(\Magento\Framework\Data\Structure::CHILDREN, $this->_structure->getElement('six'));
     // specify element by parent and alias
     $this->_structure->unsetChild('four', 'tw');
     $this->assertFalse($this->_structure->getChildId('four', 'tw'));
     $this->assertFalse($this->_structure->getParentId('two'));
 }