Code Duplication    Length = 19-21 lines in 2 locations

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

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

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

@@ 470-490 (lines=21) @@
467
     *
468
     * @see \eZ\Publish\API\Repository\SearchService::findLocations()
469
     */
470
    public function testQueryCustomField()
471
    {
472
        $query = new LocationQuery(
473
            [
474
                'query' => new Criterion\CustomField(
475
                    'custom_field',
476
                    Criterion\Operator::EQ,
477
                    'AdMiNiStRaToR'
478
                ),
479
                'offset' => 0,
480
                'limit' => 10,
481
                'sortClauses' => [new SortClause\ContentId()],
482
            ]
483
        );
484
        $this->assertQueryFixture(
485
            $query,
486
            $this->getFixtureDir() . '/QueryCustomField.php',
487
            null,
488
            true
489
        );
490
    }
491
492
    /**
493
     * Test for the findLocations() method.