Esempio n. 1
0
 /**
  * @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'));
 }
Esempio n. 2
0
 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));
 }
Esempio n. 3
0
 /**
  * {@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);
     }
 }