public function testOptionOnlyActiveBranchNoParentsAndBothDepthsSpecified() { $options = array('minDepth' => 2, 'maxDepth' => 2, 'onlyActiveBranch' => true, 'renderParents' => false); $expected = $this->_getExpected('menu/onlyactivebranch_np_bd.html'); $actual = $this->_helper->renderMenu(null, $options); $this->assertEquals($expected, $actual); }
/** * @group ZF-7212 */ public function testRenderingOnlyActiveBranchWithUlId() { $this->_helper->setUlId('foo')->setOnlyActiveBranch()->setRenderParents(); $this->assertContains('<ul class="navigation" id="foo">', $this->_helper->renderMenu()); }
/** * @group ZF-8951 */ public function testOptionRenderParentClassAndParentClass() { $expected = $this->_getExpected('menu/parentclass_custom.html'); $actual = $this->_helper->renderMenu(null, array('renderParentClass' => true, 'parentClass' => 'foo')); $this->assertEquals($expected, $actual); }
/** * Intercept renderMenu() call and apply custom Twitter Bootstrap class/id * attributes. * * @see Zend_View_Helper_Navigation_Menu::renderMenu() * @param Zend_Navigation_Container $container (Optional) The navigation container. * @param array $options (Optional) Options for controlling rendering. * * @return string */ public function renderMenu(Zend_Navigation_Container $container = null, array $options = array()) { return $this->applyBootstrapClassesAndIds(parent::renderMenu($container, $options)); }