|
@@ 1293-1305 (lines=13) @@
|
| 1290 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
| 1291 |
|
* @expectedExceptionMessage Argument '$sortClause->targetData' is invalid: No searchable fields found for the given sort clause target 'title' on 'template_look' |
| 1292 |
|
*/ |
| 1293 |
|
public function testSortFieldWithNonSearchableField() |
| 1294 |
|
{ |
| 1295 |
|
$repository = $this->getRepository(); |
| 1296 |
|
$searchService = $repository->getSearchService(); |
| 1297 |
|
|
| 1298 |
|
$searchService->findContent( |
| 1299 |
|
new Query( |
| 1300 |
|
array( |
| 1301 |
|
'sortClauses' => array(new SortClause\Field('template_look', 'title')), |
| 1302 |
|
) |
| 1303 |
|
) |
| 1304 |
|
); |
| 1305 |
|
} |
| 1306 |
|
|
| 1307 |
|
/** |
| 1308 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
@@ 1311-1330 (lines=20) @@
|
| 1308 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
| 1309 |
|
* @expectedExceptionMessage Argument '$sortClause->targetData' is invalid: No searchable fields found for the given sort clause target 'title' on 'template_look' |
| 1310 |
|
*/ |
| 1311 |
|
public function testSortMapLocationDistanceWithNonSearchableField() |
| 1312 |
|
{ |
| 1313 |
|
$repository = $this->getRepository(); |
| 1314 |
|
$searchService = $repository->getSearchService(); |
| 1315 |
|
|
| 1316 |
|
$searchService->findContent( |
| 1317 |
|
new Query( |
| 1318 |
|
array( |
| 1319 |
|
'sortClauses' => array( |
| 1320 |
|
new SortClause\MapLocationDistance( |
| 1321 |
|
'template_look', |
| 1322 |
|
'title', |
| 1323 |
|
1, |
| 1324 |
|
2 |
| 1325 |
|
), |
| 1326 |
|
), |
| 1327 |
|
) |
| 1328 |
|
) |
| 1329 |
|
); |
| 1330 |
|
} |
| 1331 |
|
|
| 1332 |
|
/** |
| 1333 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |