| @@ 231-251 (lines=21) @@ | ||
| 228 | * |
|
| 229 | * @see \eZ\Publish\API\Repository\SearchService::findLocations() |
|
| 230 | */ |
|
| 231 | public function testQueryCustomField() |
|
| 232 | { |
|
| 233 | $query = new LocationQuery( |
|
| 234 | array( |
|
| 235 | 'query' => new Criterion\CustomField( |
|
| 236 | 'custom_field', |
|
| 237 | Criterion\Operator::EQ, |
|
| 238 | 'AdMiNiStRaToR' |
|
| 239 | ), |
|
| 240 | 'offset' => 0, |
|
| 241 | 'limit' => 10, |
|
| 242 | 'sortClauses' => array(new SortClause\ContentId()), |
|
| 243 | ) |
|
| 244 | ); |
|
| 245 | $this->assertQueryFixture( |
|
| 246 | $query, |
|
| 247 | $this->getFixtureDir() . '/QueryCustomField.php', |
|
| 248 | null, |
|
| 249 | true |
|
| 250 | ); |
|
| 251 | } |
|
| 252 | ||
| 253 | /** |
|
| 254 | * Test for the findLocations() method. |
|
| @@ 2754-2772 (lines=19) @@ | ||
| 2751 | * |
|
| 2752 | * @see \eZ\Publish\API\Repository\SearchService::findContent() |
|
| 2753 | */ |
|
| 2754 | public function testQueryCustomField() |
|
| 2755 | { |
|
| 2756 | $query = new Query( |
|
| 2757 | array( |
|
| 2758 | 'query' => new Criterion\CustomField( |
|
| 2759 | 'custom_field', |
|
| 2760 | Criterion\Operator::EQ, |
|
| 2761 | 'AdMiNiStRaToR' |
|
| 2762 | ), |
|
| 2763 | 'offset' => 0, |
|
| 2764 | 'limit' => 10, |
|
| 2765 | 'sortClauses' => array(new SortClause\ContentId()), |
|
| 2766 | ) |
|
| 2767 | ); |
|
| 2768 | $this->assertQueryFixture( |
|
| 2769 | $query, |
|
| 2770 | $this->getFixtureDir() . '/QueryCustomField.php' |
|
| 2771 | ); |
|
| 2772 | } |
|
| 2773 | ||
| 2774 | /** |
|
| 2775 | * Test for the findContent() method. |
|