public function testSetMinDepth()
 {
     $this->_helper->setMinDepth(2);
     $this->_helper->findOneByLabel('Page 2.3')->setActive();
     // level 1
     $flag = Zend_View_Helper_Navigation_Links::RENDER_NEXT;
     $expected = '';
     $actual = $this->_helper->setRenderFlag($flag)->render();
     $this->assertEquals($expected, $actual);
 }
Exemplo n.º 2
0
 /**
  * @group ZF-8874
  */
 public function testRenderingWithoutWhitespace()
 {
     $active = $this->_helper->findOneByLabel('Page 1.1');
     $newFlag = Zend_View_Helper_Navigation_Links::RENDER_NEXT | Zend_View_Helper_Navigation_Links::RENDER_PREV;
     $this->_helper->setRenderFlag($newFlag);
     $this->_helper->setIndent('  ');
     $active->active = true;
     $this->_helper->setFormatOutput(false);
     // build expected and actual result
     $expected = '<link rel="next" href="page2" title="Page 2">' . '<link rel="prev" href="page1" title="Page 1">';
     $actual = $this->_helper->render();
     $this->assertEquals($expected, $actual);
 }