public function testAddBackendLink() { NavBar::addBackendLink(array('title' => 'Home', 'url' => 'li3_backend.Home::index')); $result = $this->getNavigationArray(); $expected = array('title' => 'Home', 'url' => 'li3_backend.Home::index', 'options' => array()); $this->assertEqual($expected, $result['navbar']['components']['links'][0]); NavBar::addBackendLink(array('title' => 'HomeNew', 'url' => 'li3_backend.Home::new', 'options' => array('escape' => false))); $result = $this->getNavigationArray(); $expected = array('title' => 'HomeNew', 'url' => 'li3_backend.Home::new', 'options' => array('escape' => false)); $this->assertEqual($expected, $result['navbar']['components']['links'][1]); NavBar::addBackendLink(array('title' => 'HomeTop', 'url' => 'li3_backend.Home::top'), false); $result = $this->getNavigationArray(); $expected = array('title' => 'HomeTop', 'url' => 'li3_backend.Home::top', 'options' => array()); $this->assertEqual($expected, $result['navbar']['links'][0]); }