Commit 6bfc6d767d48d10045f369b81352a8221f9c8e7c
1 parent
3cdedf36
Changed function names from camel case to underscores
Committed By: Kevin Cyster Reviewed By: Megan Watson
Showing
1 changed file
with
17 additions
and
17 deletions
tests/api/testSavedSearches.php
| ... | ... | @@ -79,7 +79,7 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 79 | 79 | { |
| 80 | 80 | // case 1: search exists |
| 81 | 81 | $searchID = $this->savedSearch->create('test_search', '(GeneralText contains "title")'); |
| 82 | - $list = $this->savedSearch->getList(); | |
| 82 | + $list = $this->savedSearch->get_list(); | |
| 83 | 83 | |
| 84 | 84 | foreach($list as $item){ |
| 85 | 85 | if($item['id'] == $searchID){ |
| ... | ... | @@ -87,14 +87,14 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 87 | 87 | break; |
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | - $savedSearch = $this->savedSearch->getSavedSearch($search); | |
| 90 | + $savedSearch = $this->savedSearch->get_saved_search($search); | |
| 91 | 91 | |
| 92 | 92 | $this->assertNotNull($savedSearch); |
| 93 | 93 | $this->assertNoErrors(); |
| 94 | 94 | $this->savedSearch->delete($searchID); |
| 95 | 95 | |
| 96 | 96 | // case 2: search does NOT exists |
| 97 | - $list = $this->savedSearch->getList(); | |
| 97 | + $list = $this->savedSearch->get_list(); | |
| 98 | 98 | $inList = FALSE; |
| 99 | 99 | foreach($list as $item){ |
| 100 | 100 | if($item['id'] == $searchID){ |
| ... | ... | @@ -118,7 +118,7 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 118 | 118 | // case 1: Saved searches exist |
| 119 | 119 | $array = array(); |
| 120 | 120 | $searchID = $this->savedSearch->create('test_search', '(GeneralText contains "title")'); |
| 121 | - $list = $this->savedSearch->getList(); | |
| 121 | + $list = $this->savedSearch->get_list(); | |
| 122 | 122 | $this->assertNotA($list, 'PEAR_Error'); |
| 123 | 123 | $this->assertNotEqual($list, $array); |
| 124 | 124 | $this->assertNoErrors(); |
| ... | ... | @@ -126,7 +126,7 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 126 | 126 | $this->savedSearch->delete($searchID); |
| 127 | 127 | |
| 128 | 128 | // case 2: saved search does NOT exist |
| 129 | - $list = $this->savedSearch->getList(); | |
| 129 | + $list = $this->savedSearch->get_list(); | |
| 130 | 130 | |
| 131 | 131 | $inList = FALSE; |
| 132 | 132 | foreach($list as $item){ |
| ... | ... | @@ -148,7 +148,7 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 148 | 148 | { |
| 149 | 149 | $searchID = $this->savedSearch->create('test_search', '(GeneralText contains "title")'); |
| 150 | 150 | $this->savedSearch->delete($searchID); |
| 151 | - $result = $this->savedSearch->getSavedSearch($searchID); | |
| 151 | + $result = $this->savedSearch->get_saved_search($searchID); | |
| 152 | 152 | |
| 153 | 153 | $array = array(); |
| 154 | 154 | $this->assertEqual($result, $array); |
| ... | ... | @@ -169,7 +169,7 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 169 | 169 | |
| 170 | 170 | $searchID = $this->savedSearch->create('test_search', '(GeneralText contains "title")'); |
| 171 | 171 | |
| 172 | - $result = $this->savedSearch->runSavedSearch($searchID); | |
| 172 | + $result = $this->savedSearch->run_saved_search($searchID); | |
| 173 | 173 | |
| 174 | 174 | $this->assertNotNull($result); |
| 175 | 175 | $this->assertNotA($result, 'PEAR_Error'); |
| ... | ... | @@ -188,7 +188,7 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 188 | 188 | public function testCreate_KTAPI() |
| 189 | 189 | { |
| 190 | 190 | //case 1: user logged in |
| 191 | - $response = $this->ktapi->createSavedSearch('test_search', '(GeneralText contains "title")'); | |
| 191 | + $response = $this->ktapi->create_saved_search('test_search', '(GeneralText contains "title")'); | |
| 192 | 192 | |
| 193 | 193 | $this->assertIsA($response, 'array'); |
| 194 | 194 | $this->assertEqual($response['status_code'], 0); |
| ... | ... | @@ -198,7 +198,7 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 198 | 198 | |
| 199 | 199 | //case 2: user NOT logged in |
| 200 | 200 | $this->ktapi->session_logout(); |
| 201 | - $response = $this->ktapi->createSavedSearch('test_search', '(GeneralText contains "title")'); | |
| 201 | + $response = $this->ktapi->create_saved_search('test_search', '(GeneralText contains "title")'); | |
| 202 | 202 | |
| 203 | 203 | $this->assertIsA($response, 'array'); |
| 204 | 204 | $this->assertEqual($response['status_code'], 1); |
| ... | ... | @@ -213,7 +213,7 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 213 | 213 | { |
| 214 | 214 | // case 1: search exists |
| 215 | 215 | $searchID = $this->savedSearch->create('test_search', '(GeneralText contains "title")'); |
| 216 | - $list = $this->savedSearch->getList(); | |
| 216 | + $list = $this->savedSearch->get_list(); | |
| 217 | 217 | |
| 218 | 218 | foreach($list as $item){ |
| 219 | 219 | if($item['id'] == $searchID){ |
| ... | ... | @@ -221,7 +221,7 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 221 | 221 | break; |
| 222 | 222 | } |
| 223 | 223 | } |
| 224 | - $response = $this->ktapi->getSavedSearch($search); | |
| 224 | + $response = $this->ktapi->get_saved_search($search); | |
| 225 | 225 | |
| 226 | 226 | $this->assertIsA($response, 'array'); |
| 227 | 227 | $this->assertEqual($response['status_code'], 0); |
| ... | ... | @@ -229,7 +229,7 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 229 | 229 | $this->savedSearch->delete($searchID); |
| 230 | 230 | |
| 231 | 231 | // case 2: search does NOT exists |
| 232 | - $response = $this->ktapi->getSavedSearch($searchID); | |
| 232 | + $response = $this->ktapi->get_saved_search($searchID); | |
| 233 | 233 | |
| 234 | 234 | $this->assertIsA($response, 'array'); |
| 235 | 235 | $this->assertEqual($response['status_code'], 1); |
| ... | ... | @@ -247,7 +247,7 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 247 | 247 | $array = array(); |
| 248 | 248 | $searchID = $this->savedSearch->create('test_search', '(GeneralText contains "title")'); |
| 249 | 249 | |
| 250 | - $response = $this->ktapi->getSavedSearchList(); | |
| 250 | + $response = $this->ktapi->get_saved_search_list(); | |
| 251 | 251 | |
| 252 | 252 | $this->assertIsA($response, 'array'); |
| 253 | 253 | $this->assertEqual($response['status_code'], 0); |
| ... | ... | @@ -255,7 +255,7 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 255 | 255 | $this->savedSearch->delete($searchID); |
| 256 | 256 | |
| 257 | 257 | // case 2: saved search does NOT exist |
| 258 | - $response = $this->ktapi->getSavedSearchList(); | |
| 258 | + $response = $this->ktapi->get_saved_search_list(); | |
| 259 | 259 | |
| 260 | 260 | $this->assertIsA($response, 'array'); |
| 261 | 261 | $this->assertEqual($response['status_code'], 1); |
| ... | ... | @@ -269,8 +269,8 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 269 | 269 | public function testDelete_KTAPI() |
| 270 | 270 | { |
| 271 | 271 | $searchID = $this->savedSearch->create('test_search', '(GeneralText contains "title")'); |
| 272 | - $response = $this->ktapi->deleteSavedSearch($searchID); | |
| 273 | - $result = $this->savedSearch->getSavedSearch($searchID); | |
| 272 | + $response = $this->ktapi->delete_saved_search($searchID); | |
| 273 | + $result = $this->savedSearch->get_saved_search($searchID); | |
| 274 | 274 | |
| 275 | 275 | $array = array(); |
| 276 | 276 | $this->assertEqual($result, $array); |
| ... | ... | @@ -292,7 +292,7 @@ class savedSearchTestCase extends KTUnitTestCase { |
| 292 | 292 | |
| 293 | 293 | $searchID = $this->savedSearch->create('test_search', '(GeneralText contains "title")'); |
| 294 | 294 | |
| 295 | - $response = $this->ktapi->runSavedSearch($searchID); | |
| 295 | + $response = $this->ktapi->run_saved_search($searchID); | |
| 296 | 296 | |
| 297 | 297 | $this->assertIsA($response, 'array'); |
| 298 | 298 | $this->assertEqual($response['status_code'], 0); | ... | ... |