public function testHasClickCallbackReturnsTrueIfItemHasNoAction() { $this->_params['action'] = ''; $item = new Mage_Backend_Model_Menu_Item($this->_validatorMock, $this->_aclMock, $this->_appConfigMock, $this->_storeConfigMock, $this->_menuFactoryMock, $this->_urlModelMock, $this->_helperMock, $this->_params); $this->assertTrue($item->hasClickCallback()); }
/** * Render menu item onclick function * * @param Mage_Backend_Model_Menu_Item $menuItem * @return string */ protected function _renderItemOnclickFunction($menuItem) { return $menuItem->hasClickCallback() ? ' onclick="' . $menuItem->getClickCallback() . '"' : ''; }
public function testHasClickCallbackReturnsTrueIfItemHasNoAction() { $this->_params['action'] = ''; $item = new Mage_Backend_Model_Menu_Item($this->_params); $this->assertTrue($item->hasClickCallback()); }