| @@ 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. |
|
| @@ 2740-2758 (lines=19) @@ | ||
| 2737 | * |
|
| 2738 | * @see \eZ\Publish\API\Repository\SearchService::findContent() |
|
| 2739 | */ |
|
| 2740 | public function testQueryCustomField() |
|
| 2741 | { |
|
| 2742 | $query = new Query( |
|
| 2743 | array( |
|
| 2744 | 'query' => new Criterion\CustomField( |
|
| 2745 | 'custom_field', |
|
| 2746 | Criterion\Operator::EQ, |
|
| 2747 | 'AdMiNiStRaToR' |
|
| 2748 | ), |
|
| 2749 | 'offset' => 0, |
|
| 2750 | 'limit' => 10, |
|
| 2751 | 'sortClauses' => array(new SortClause\ContentId()), |
|
| 2752 | ) |
|
| 2753 | ); |
|
| 2754 | $this->assertQueryFixture( |
|
| 2755 | $query, |
|
| 2756 | $this->getFixtureDir() . '/QueryCustomField.php' |
|
| 2757 | ); |
|
| 2758 | } |
|
| 2759 | ||
| 2760 | /** |
|
| 2761 | * Test for the findContent() method. |
|