| @@ 218-228 (lines=11) @@ | ||
| 215 | } |
|
| 216 | ||
| 217 | ||
| 218 | public function testSimilarNullItem() { |
|
| 219 | $es = new ElasticSearcher(); |
|
| 220 | $es->setClasses('FlickrPhotoTO'); |
|
| 221 | $fields = array('Title.standard' => 1, 'Description.standard' => 1); |
|
| 222 | ||
| 223 | try { |
|
| 224 | $paginated = $es->moreLikeThis(null, $fields, true); |
|
| 225 | } catch (InvalidArgumentException $e) { |
|
| 226 | $this->assertEquals('A searchable item cannot be null', $e->getMessage()); |
|
| 227 | } |
|
| 228 | } |
|
| 229 | ||
| 230 | ||
| 231 | ||
| @@ 179-189 (lines=11) @@ | ||
| 176 | } |
|
| 177 | ||
| 178 | ||
| 179 | public function testSimilarNullItem() { |
|
| 180 | $es = new ElasticSearcher(); |
|
| 181 | $es->setClasses('FlickrPhotoTO'); |
|
| 182 | $fields = array('Title.standard' => 1, 'Description.standard' => 1); |
|
| 183 | ||
| 184 | try { |
|
| 185 | $paginated = $es->moreLikeThis(null, $fields, true); |
|
| 186 | } catch (InvalidArgumentException $e) { |
|
| 187 | $this->assertEquals('A searchable item cannot be null', $e->getMessage()); |
|
| 188 | } |
|
| 189 | } |
|
| 190 | ||
| 191 | ||
| 192 | ||