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