| @@ 303-320 (lines=18) @@ | ||
| 300 | /** |
|
| 301 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
| 302 | */ |
|
| 303 | public function testInvalidFieldIdentifierRange() |
|
| 304 | { |
|
| 305 | $repository = $this->getRepository(); |
|
| 306 | $searchService = $repository->getSearchService(); |
|
| 307 | ||
| 308 | $searchService->findLocations( |
|
| 309 | new LocationQuery( |
|
| 310 | [ |
|
| 311 | 'filter' => new Criterion\Field( |
|
| 312 | 'some_hopefully_unknown_field', |
|
| 313 | Criterion\Operator::BETWEEN, |
|
| 314 | [10, 1000] |
|
| 315 | ), |
|
| 316 | 'sortClauses' => [new SortClause\ContentId()], |
|
| 317 | ] |
|
| 318 | ) |
|
| 319 | ); |
|
| 320 | } |
|
| 321 | ||
| 322 | /** |
|
| 323 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
| @@ 1407-1424 (lines=18) @@ | ||
| 1404 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
| 1405 | * @expectedExceptionMessage Argument '$criterion->target' is invalid: No searchable fields found for the given criterion target 'some_hopefully_unknown_field' |
|
| 1406 | */ |
|
| 1407 | public function testInvalidFieldIdentifierRange() |
|
| 1408 | { |
|
| 1409 | $repository = $this->getRepository(); |
|
| 1410 | $searchService = $repository->getSearchService(); |
|
| 1411 | ||
| 1412 | $searchService->findContent( |
|
| 1413 | new Query( |
|
| 1414 | [ |
|
| 1415 | 'filter' => new Criterion\Field( |
|
| 1416 | 'some_hopefully_unknown_field', |
|
| 1417 | Criterion\Operator::BETWEEN, |
|
| 1418 | [10, 1000] |
|
| 1419 | ), |
|
| 1420 | 'sortClauses' => [new SortClause\ContentId()], |
|
| 1421 | ] |
|
| 1422 | ) |
|
| 1423 | ); |
|
| 1424 | } |
|
| 1425 | ||
| 1426 | /** |
|
| 1427 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|