コード例 #1
0
 public function testIsVisibleProceedsWithVisibilityCheckIfSectionIsAllowed()
 {
     $this->_authorizationMock->expects($this->any())->method('isAllowed')->will($this->returnValue(true));
     $this->_applicationMock->expects($this->once())->method('isSingleStoreMode')->will($this->returnValue(true));
     $this->_model->setData(array('resource' => 'Mage_Adminhtml::all'), 'scope');
     $this->_model->isVisible();
 }
コード例 #2
0
 /**
  * Check whether section should be displayed as active
  *
  * @param Mage_Backend_Model_Config_Structure_Element_Section $section
  * @return bool
  */
 public function isSectionActive(Mage_Backend_Model_Config_Structure_Element_Section $section)
 {
     return $section->getId() == $this->_currentSectionId;
 }