Index: tests/Zend/View/Helper/Navigation/MenuTest.php
===================================================================
--- tests/Zend/View/Helper/Navigation/MenuTest.php (revision 25013)
+++ tests/Zend/View/Helper/Navigation/MenuTest.php (working copy)
@@ -704,4 +704,72 @@
$this->_helper->renderSubMenu(null, null, null, 'foo')
);
}
+
+ /**
+ * @group ZF-7212
+ */
+ public function testRenderingDeepestMenuWithUlId()
+ {
+ $this->assertContains(
+ '
',
+ $this->_helper->renderMenu(null, array('ulId' => 'foo'))
+ );
+ }
+
+ /**
+ * @group ZF-7003
+ */
+ public function testSetAddPageClassToLi()
+ {
+ $this->_helper->addPageClassToLi();
+ $this->assertTrue($this->_helper->getAddPageClassToLi());
+ }
+
+ /**
+ * @group ZF-7003
+ */
+ public function testRenderingWithPageClassToLi()
+ {
+ $this->_helper->addPageClassToLi();
+
+ // Add css class
+ $container = $this->_helper->getContainer();
+ $container->findBy('href', 'page1')->setClass('foo');
+
+ // Tests
+ $this->assertContains(
+ '- ',
+ $this->_helper->renderMenu()
+ );
+ $this->assertNotContains(
+ 'Page 1',
+ $this->_helper->renderMenu()
+ );
+ }
+
+ /**
+ * @group ZF-7003
+ */
+ public function testRenderDeepestMenuWithPageClassToLi()
+ {
+ // Add css class
+ $container = $this->_helper->getContainer();
+ $container->findBy('label', 'Page 2.3.3.1')->setClass('foo');
+
+ // Tests
+ $options = array(
+ 'onlyActiveBranch' => true,
+ 'renderParents' => false,
+ 'addPageClassToLi' => true,
+ );
+
+ $this->assertContains(
+ '
- ',
+ $this->_helper->renderMenu(null, $options)
+ );
+ $this->assertNotContains(
+ 'Page 1',
+ $this->_helper->renderMenu(null, $options)
+ );
+ }
}