|
@@ 1476-1488 (lines=13) @@
|
| 1473 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
| 1474 |
|
* @expectedExceptionMessage Argument '$sortClause->targetData' is invalid: No searchable fields found for the given sort clause target 'title' on 'template_look' |
| 1475 |
|
*/ |
| 1476 |
|
public function testSortFieldWithNonSearchableField() |
| 1477 |
|
{ |
| 1478 |
|
$repository = $this->getRepository(); |
| 1479 |
|
$searchService = $repository->getSearchService(); |
| 1480 |
|
|
| 1481 |
|
$searchService->findContent( |
| 1482 |
|
new Query( |
| 1483 |
|
[ |
| 1484 |
|
'sortClauses' => [new SortClause\Field('template_look', 'title')], |
| 1485 |
|
] |
| 1486 |
|
) |
| 1487 |
|
); |
| 1488 |
|
} |
| 1489 |
|
|
| 1490 |
|
/** |
| 1491 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
@@ 1494-1513 (lines=20) @@
|
| 1491 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
| 1492 |
|
* @expectedExceptionMessage Argument '$sortClause->targetData' is invalid: No searchable fields found for the given sort clause target 'title' on 'template_look' |
| 1493 |
|
*/ |
| 1494 |
|
public function testSortMapLocationDistanceWithNonSearchableField() |
| 1495 |
|
{ |
| 1496 |
|
$repository = $this->getRepository(); |
| 1497 |
|
$searchService = $repository->getSearchService(); |
| 1498 |
|
|
| 1499 |
|
$searchService->findContent( |
| 1500 |
|
new Query( |
| 1501 |
|
[ |
| 1502 |
|
'sortClauses' => [ |
| 1503 |
|
new SortClause\MapLocationDistance( |
| 1504 |
|
'template_look', |
| 1505 |
|
'title', |
| 1506 |
|
1, |
| 1507 |
|
2 |
| 1508 |
|
), |
| 1509 |
|
], |
| 1510 |
|
] |
| 1511 |
|
) |
| 1512 |
|
); |
| 1513 |
|
} |
| 1514 |
|
|
| 1515 |
|
/** |
| 1516 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |