public function testGetUrlWithValidActionReturnsUrl() { $this->_urlModelMock->expects($this->once())->method('getUrl')->with($this->equalTo('/system/config'))->will($this->returnValue('Url')); $this->assertEquals('Url', $this->_model->getUrl()); }
/** * Render menu item anchor * @param Mage_Backend_Model_Menu_Item $menuItem * @param int $level * @return string */ protected function _renderAnchor($menuItem, $level) { return '<a href="' . $menuItem->getUrl() . '" ' . $this->_renderItemAnchorTitle($menuItem) . $this->_renderItemOnclickFunction($menuItem) . ' class="' . $this->_renderAnchorCssClass($menuItem, $level) . '">' . '<span>' . $this->_getAnchorLabel($menuItem) . '</span>' . '</a>'; }
public function testGetUrlWithValidActionReturnsUrl() { $this->_urlModelMock->expects($this->once())->method('getUrl')->with($this->equalTo('/system/config'))->will($this->returnValue('Url')); $item = new Mage_Backend_Model_Menu_Item($this->_params); $this->assertEquals('Url', $item->getUrl()); }