public function returnSavedSearch($id) { $savedSearch = new SavedSearch(); //execute the method and test if it works and does not throws an exception. try { $savedSearch->returnSavedSearch($id); $this->assertTrue(true); } catch (Exception $e) { $this->fail(); } }
break; case 'delete': // delete here $ss->handleDelete($_REQUEST['saved_search_select']); break; } } elseif (!empty($_REQUEST['saved_search_select'])) { // requesting a search here. if (!empty($_REQUEST['searchFormTab'])) { // where is the request from $searchFormTab = $_REQUEST['searchFormTab']; } else { $searchFormTab = 'saved_views'; } if ($_REQUEST['saved_search_select'] == '_none') { // none selected $_SESSION['LastSavedView'][$_REQUEST['search_module']] = ''; $current_user->setPreference('ListViewDisplayColumns', array(), 0, $_REQUEST['search_module']); header("Location: index.php?action=index&module={$_REQUEST['search_module']}&searchFormTab={$searchFormTab}&query=true&clear_query=true"); die; } else { $ss = new SavedSearch(); $show = 'no'; if (isset($_REQUEST['showSSDIV'])) { $show = $_REQUEST['showSSDIV']; } $ss->returnSavedSearch($_REQUEST['saved_search_select'], $searchFormTab, $show); } } else { include 'modules/SavedSearch/ListView.php'; }