/** * @magentoAppIsolation enabled */ public function testGetParentName() { $this->_layout->addContainer('one', 'One'); $this->_layout->addContainer('two', 'Two', [], 'one'); $this->assertFalse($this->_layout->getParentName('one')); $this->assertEquals('one', $this->_layout->getParentName('two')); }
public function testGetParentName() { $childName = 'child_name'; $parentId = 'parent_id'; $this->structureMock->expects($this->once())->method('getParentId')->with($this->equalTo($childName))->will($this->returnValue($parentId)); $this->assertSame($parentId, $this->model->getParentName($childName)); }
/** * {@inheritdoc} */ public function getParentName($childName) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getParentName'); if (!$pluginInfo) { return parent::getParentName($childName); } else { return $this->___callPlugins('getParentName', func_get_args(), $pluginInfo); } }