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