| @@ 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 |
|
| @@ 1378-1395 (lines=18) @@ | ||
| 1375 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
| 1376 | * @expectedExceptionMessage Argument '$criterion->target' is invalid: No searchable fields found for the given criterion target 'some_hopefully_unknown_field' |
|
| 1377 | */ |
|
| 1378 | public function testInvalidFieldIdentifierRange() |
|
| 1379 | { |
|
| 1380 | $repository = $this->getRepository(); |
|
| 1381 | $searchService = $repository->getSearchService(); |
|
| 1382 | ||
| 1383 | $searchService->findContent( |
|
| 1384 | new Query( |
|
| 1385 | [ |
|
| 1386 | 'filter' => new Criterion\Field( |
|
| 1387 | 'some_hopefully_unknown_field', |
|
| 1388 | Criterion\Operator::BETWEEN, |
|
| 1389 | [10, 1000] |
|
| 1390 | ), |
|
| 1391 | 'sortClauses' => [new SortClause\ContentId()], |
|
| 1392 | ] |
|
| 1393 | ) |
|
| 1394 | ); |
|
| 1395 | } |
|
| 1396 | ||
| 1397 | /** |
|
| 1398 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|