| @@ 246-266 (lines=21) @@ | ||
| 243 | * |
|
| 244 | * @see \eZ\Publish\API\Repository\SearchService::findLocations() |
|
| 245 | */ |
|
| 246 | public function testQueryCustomField() |
|
| 247 | { |
|
| 248 | $query = new LocationQuery( |
|
| 249 | [ |
|
| 250 | 'query' => new Criterion\CustomField( |
|
| 251 | 'custom_field', |
|
| 252 | Criterion\Operator::EQ, |
|
| 253 | 'AdMiNiStRaToR' |
|
| 254 | ), |
|
| 255 | 'offset' => 0, |
|
| 256 | 'limit' => 10, |
|
| 257 | 'sortClauses' => [new SortClause\ContentId()], |
|
| 258 | ] |
|
| 259 | ); |
|
| 260 | $this->assertQueryFixture( |
|
| 261 | $query, |
|
| 262 | $this->getFixtureDir() . '/QueryCustomField.php', |
|
| 263 | null, |
|
| 264 | true |
|
| 265 | ); |
|
| 266 | } |
|
| 267 | ||
| 268 | /** |
|
| 269 | * Test for the findLocations() method. |
|
| @@ 2520-2538 (lines=19) @@ | ||
| 2517 | * |
|
| 2518 | * @see \eZ\Publish\API\Repository\SearchService::findContent() |
|
| 2519 | */ |
|
| 2520 | public function testQueryCustomField() |
|
| 2521 | { |
|
| 2522 | $query = new Query( |
|
| 2523 | [ |
|
| 2524 | 'query' => new Criterion\CustomField( |
|
| 2525 | 'custom_field', |
|
| 2526 | Criterion\Operator::EQ, |
|
| 2527 | 'AdMiNiStRaToR' |
|
| 2528 | ), |
|
| 2529 | 'offset' => 0, |
|
| 2530 | 'limit' => 10, |
|
| 2531 | 'sortClauses' => [new SortClause\ContentId()], |
|
| 2532 | ] |
|
| 2533 | ); |
|
| 2534 | $this->assertQueryFixture( |
|
| 2535 | $query, |
|
| 2536 | $this->getFixtureDir() . '/QueryCustomField.php' |
|
| 2537 | ); |
|
| 2538 | } |
|
| 2539 | ||
| 2540 | /** |
|
| 2541 | * Test for the findContent() method. |
|