public function returnSavedSearchContents($id) { $savedSearch = new SavedSearch(); //execute the method and test if it works and does not throws an exception. try { $result = $savedSearch->returnSavedSearchContents($id); $this->assertTrue(true); } catch (Exception $e) { $this->fail(); } }