Code Duplication    Length = 19-21 lines in 2 locations

eZ/Publish/API/Repository/Tests/SearchServiceLocationTest.php 1 location

@@ 246-266 (lines=21) @@
243
     *
244
     * @see \eZ\Publish\API\Repository\SearchService::findLocations()
245
     */
246
    public function testQueryCustomField()
247
    {
248
        $query = new LocationQuery(
249
            array(
250
                'query' => new Criterion\CustomField(
251
                    'custom_field',
252
                    Criterion\Operator::EQ,
253
                    'AdMiNiStRaToR'
254
                ),
255
                'offset' => 0,
256
                'limit' => 10,
257
                'sortClauses' => array(new SortClause\ContentId()),
258
            )
259
        );
260
        $this->assertQueryFixture(
261
            $query,
262
            $this->getFixtureDir() . '/QueryCustomField.php',
263
            null,
264
            true
265
        );
266
    }
267
268
    /**
269
     * Test for the findLocations() method.

eZ/Publish/API/Repository/Tests/SearchServiceTest.php 1 location

@@ 2521-2539 (lines=19) @@
2518
     *
2519
     * @see \eZ\Publish\API\Repository\SearchService::findContent()
2520
     */
2521
    public function testQueryCustomField()
2522
    {
2523
        $query = new Query(
2524
            array(
2525
                'query' => new Criterion\CustomField(
2526
                    'custom_field',
2527
                    Criterion\Operator::EQ,
2528
                    'AdMiNiStRaToR'
2529
                ),
2530
                'offset' => 0,
2531
                'limit' => 10,
2532
                'sortClauses' => array(new SortClause\ContentId()),
2533
            )
2534
        );
2535
        $this->assertQueryFixture(
2536
            $query,
2537
            $this->getFixtureDir() . '/QueryCustomField.php'
2538
        );
2539
    }
2540
2541
    /**
2542
     * Test for the findContent() method.