| @@ 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. |
|
| @@ 2756-2774 (lines=19) @@ | ||
| 2753 | * |
|
| 2754 | * @see \eZ\Publish\API\Repository\SearchService::findContent() |
|
| 2755 | */ |
|
| 2756 | public function testQueryCustomField() |
|
| 2757 | { |
|
| 2758 | $query = new Query( |
|
| 2759 | array( |
|
| 2760 | 'query' => new Criterion\CustomField( |
|
| 2761 | 'custom_field', |
|
| 2762 | Criterion\Operator::EQ, |
|
| 2763 | 'AdMiNiStRaToR' |
|
| 2764 | ), |
|
| 2765 | 'offset' => 0, |
|
| 2766 | 'limit' => 10, |
|
| 2767 | 'sortClauses' => array(new SortClause\ContentId()), |
|
| 2768 | ) |
|
| 2769 | ); |
|
| 2770 | $this->assertQueryFixture( |
|
| 2771 | $query, |
|
| 2772 | $this->getFixtureDir() . '/QueryCustomField.php' |
|
| 2773 | ); |
|
| 2774 | } |
|
| 2775 | ||
| 2776 | /** |
|
| 2777 | * Test for the findContent() method. |
|