| @@ 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. |
|
| @@ 2656-2674 (lines=19) @@ | ||
| 2653 | * |
|
| 2654 | * @see \eZ\Publish\API\Repository\SearchService::findContent() |
|
| 2655 | */ |
|
| 2656 | public function testQueryCustomField() |
|
| 2657 | { |
|
| 2658 | $query = new Query( |
|
| 2659 | [ |
|
| 2660 | 'query' => new Criterion\CustomField( |
|
| 2661 | 'custom_field', |
|
| 2662 | Criterion\Operator::EQ, |
|
| 2663 | 'AdMiNiStRaToR' |
|
| 2664 | ), |
|
| 2665 | 'offset' => 0, |
|
| 2666 | 'limit' => 10, |
|
| 2667 | 'sortClauses' => [new SortClause\ContentId()], |
|
| 2668 | ] |
|
| 2669 | ); |
|
| 2670 | $this->assertQueryFixture( |
|
| 2671 | $query, |
|
| 2672 | $this->getFixtureDir() . '/QueryCustomField.php' |
|
| 2673 | ); |
|
| 2674 | } |
|
| 2675 | ||
| 2676 | /** |
|
| 2677 | * Test for the findContent() method. |
|