Code Duplication    Length = 19-21 lines in 2 locations

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

@@ 386-406 (lines=21) @@
383
     *
384
     * @see \eZ\Publish\API\Repository\SearchService::findLocations()
385
     */
386
    public function testQueryCustomField()
387
    {
388
        $query = new LocationQuery(
389
            [
390
                'query' => new Criterion\CustomField(
391
                    'custom_field',
392
                    Criterion\Operator::EQ,
393
                    'AdMiNiStRaToR'
394
                ),
395
                'offset' => 0,
396
                'limit' => 10,
397
                'sortClauses' => [new SortClause\ContentId()],
398
            ]
399
        );
400
        $this->assertQueryFixture(
401
            $query,
402
            $this->getFixtureDir() . '/QueryCustomField.php',
403
            null,
404
            true
405
        );
406
    }
407
408
    /**
409
     * Test for the findLocations() method.

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

@@ 2685-2703 (lines=19) @@
2682
     *
2683
     * @see \eZ\Publish\API\Repository\SearchService::findContent()
2684
     */
2685
    public function testQueryCustomField()
2686
    {
2687
        $query = new Query(
2688
            [
2689
                'query' => new Criterion\CustomField(
2690
                    'custom_field',
2691
                    Criterion\Operator::EQ,
2692
                    'AdMiNiStRaToR'
2693
                ),
2694
                'offset' => 0,
2695
                'limit' => 10,
2696
                'sortClauses' => [new SortClause\ContentId()],
2697
            ]
2698
        );
2699
        $this->assertQueryFixture(
2700
            $query,
2701
            $this->getFixtureDir() . '/QueryCustomField.php'
2702
        );
2703
    }
2704
2705
    /**
2706
     * Test for the findContent() method.