Code Duplication    Length = 19-21 lines in 2 locations

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

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

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

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