| @@ 1242-1259 (lines=18) @@ | ||
| 1239 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
| 1240 | * @expectedExceptionMessage Argument '$criterion->target' is invalid: No searchable fields found for the given criterion target 'some_hopefully_unknown_field' |
|
| 1241 | */ |
|
| 1242 | public function testInvalidFieldIdentifierRange() |
|
| 1243 | { |
|
| 1244 | $repository = $this->getRepository(); |
|
| 1245 | $searchService = $repository->getSearchService(); |
|
| 1246 | ||
| 1247 | $searchService->findContent( |
|
| 1248 | new Query( |
|
| 1249 | [ |
|
| 1250 | 'filter' => new Criterion\Field( |
|
| 1251 | 'some_hopefully_unknown_field', |
|
| 1252 | Criterion\Operator::BETWEEN, |
|
| 1253 | [10, 1000] |
|
| 1254 | ), |
|
| 1255 | 'sortClauses' => [new SortClause\ContentId()], |
|
| 1256 | ] |
|
| 1257 | ) |
|
| 1258 | ); |
|
| 1259 | } |
|
| 1260 | ||
| 1261 | /** |
|
| 1262 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
| @@ 163-180 (lines=18) @@ | ||
| 160 | /** |
|
| 161 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
| 162 | */ |
|
| 163 | public function testInvalidFieldIdentifierRange() |
|
| 164 | { |
|
| 165 | $repository = $this->getRepository(); |
|
| 166 | $searchService = $repository->getSearchService(); |
|
| 167 | ||
| 168 | $searchService->findLocations( |
|
| 169 | new LocationQuery( |
|
| 170 | [ |
|
| 171 | 'filter' => new Criterion\Field( |
|
| 172 | 'some_hopefully_unknown_field', |
|
| 173 | Criterion\Operator::BETWEEN, |
|
| 174 | [10, 1000] |
|
| 175 | ), |
|
| 176 | 'sortClauses' => [new SortClause\ContentId()], |
|
| 177 | ] |
|
| 178 | ) |
|
| 179 | ); |
|
| 180 | } |
|
| 181 | ||
| 182 | /** |
|
| 183 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|