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(); }
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'); }
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'); }