/** * @group ZF-11876 */ public function testRenderingWithCustomHtmlAttribs() { $this->_nav3->findOneBy('id', 'home')->setCustomHtmlAttrib('rel', 'nofollow'); $this->_nav3->findOneBy('uri', 'contact')->setCustomHtmlAttribs(array('rel' => 'nofollow', 'style' => 'font-weight: bold;')); $this->_nav3->findOneBy('id', 'imprint')->setCustomHtmlAttrib('rel', 'nofollow'); $expected = $this->_getExpected('menu/customhtmlattribs.html'); $this->assertEquals($expected, $this->_helper->render($this->_nav3)); }
/** * @group ZF-9746 */ public function testRenderingWithAccesskey() { $this->_nav3->findOneBy('id', 'home')->setAccesskey('H'); $this->_nav3->findOneBy('uri', 'contact')->setAccesskey('c'); $this->_nav3->findOneBy('id', 'imprint')->setAccesskey('i'); $expected = $this->_getExpected('menu/accesskey.html'); $this->assertEquals($expected, $this->_helper->render($this->_nav3)); }
public function testRenderingPartialShouldFailOnInvalidPartialArray() { $this->_helper->setPartial(array('menu.phtml')); try { $this->_helper->render(); $this->fail('invalid $partial should throw Zend_View_Exception'); } catch (Zend_View_Exception $e) { } }
/** * @group ZF-8874 */ public function testRenderingWithInnerIndent() { $this->_helper->setIndent(4); // Inner indent = 0 $this->_helper->setInnerIndent(0); $expected = $this->_getExpected('menu/innerindent0.html'); $this->assertEquals($expected, $this->_helper->render($this->_nav1)); // Inner indent = 4 $this->_helper->setInnerIndent(4); $expected = $this->_getExpected('menu/innerindent4.html'); $this->assertEquals($expected, $this->_helper->render($this->_nav1)); // Inner indent = 8 $this->_helper->setInnerIndent(8); $expected = $this->_getExpected('menu/innerindent8.html'); $this->assertEquals($expected, $this->_helper->render($this->_nav1)); }
public function render(Zend_Navigation_Container $container = null, array $options = array()) { #define a partial utilizada para renderizar o menu. $this->menu()->setPartial("nav-horizontal-default.phtml"); return parent::render($container, $options); }