| @@ 233-253 (lines=21) @@ | ||
| 230 | * |
|
| 231 | * @see \eZ\Publish\API\Repository\SearchService::findLocations() |
|
| 232 | */ |
|
| 233 | public function testQueryCustomField() |
|
| 234 | { |
|
| 235 | $query = new LocationQuery( |
|
| 236 | array( |
|
| 237 | 'query' => new Criterion\CustomField( |
|
| 238 | 'custom_field', |
|
| 239 | Criterion\Operator::EQ, |
|
| 240 | 'AdMiNiStRaToR' |
|
| 241 | ), |
|
| 242 | 'offset' => 0, |
|
| 243 | 'limit' => 10, |
|
| 244 | 'sortClauses' => array(new SortClause\ContentId()), |
|
| 245 | ) |
|
| 246 | ); |
|
| 247 | $this->assertQueryFixture( |
|
| 248 | $query, |
|
| 249 | $this->getFixtureDir() . '/QueryCustomField.php', |
|
| 250 | null, |
|
| 251 | true |
|
| 252 | ); |
|
| 253 | } |
|
| 254 | ||
| 255 | /** |
|
| 256 | * Test for the findLocations() method. |
|
| @@ 2628-2646 (lines=19) @@ | ||
| 2625 | * |
|
| 2626 | * @see \eZ\Publish\API\Repository\SearchService::findContent() |
|
| 2627 | */ |
|
| 2628 | public function testQueryCustomField() |
|
| 2629 | { |
|
| 2630 | $query = new Query( |
|
| 2631 | array( |
|
| 2632 | 'query' => new Criterion\CustomField( |
|
| 2633 | 'custom_field', |
|
| 2634 | Criterion\Operator::EQ, |
|
| 2635 | 'AdMiNiStRaToR' |
|
| 2636 | ), |
|
| 2637 | 'offset' => 0, |
|
| 2638 | 'limit' => 10, |
|
| 2639 | 'sortClauses' => array(new SortClause\ContentId()), |
|
| 2640 | ) |
|
| 2641 | ); |
|
| 2642 | $this->assertQueryFixture( |
|
| 2643 | $query, |
|
| 2644 | $this->getFixtureDir() . '/QueryCustomField.php' |
|
| 2645 | ); |
|
| 2646 | } |
|
| 2647 | ||
| 2648 | /** |
|
| 2649 | * Test for the findContent() method. |
|