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