Exemplo n.º 1
0
 public function indexAction()
 {
     $searchDashboard = new SearchDashboard();
     $searchDashboard->setUser($this->Auth()->getUser());
     $this->view->dashboard = $searchDashboard->search($this->params->get('q'));
     // NOTE: This renders the dashboard twice. Remove this once we can catch exceptions thrown in view scripts.
     $this->view->dashboard->render();
 }
Exemplo n.º 2
0
 public function testWhetherSearchProvidesHintWhenSearchStringIsEmpty()
 {
     $user = new User('test');
     $user->setPermissions(array('*' => '*'));
     $dashboard = new SearchDashboard();
     $dashboard->setUser($user);
     $dashboard = $dashboard->search();
     $result = $dashboard->getPane('search')->hasDashlet('Ready to search');
     $this->assertTrue($result, 'Dashboard::search() could not get hint for search');
 }
Exemplo n.º 3
0
 public function testWhetherSearchProvidesHintWhenSearchStringIsEmpty()
 {
     $dashboard = SearchDashboard::search();
     $result = $dashboard->getPane('search')->hasDashlet('Ready to search');
     $this->assertTrue($result, 'Dashboard::search() could not get hint for search');
 }