Code Duplication    Length = 19-21 lines in 2 locations

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

@@ 2656-2674 (lines=19) @@
2653
     *
2654
     * @see \eZ\Publish\API\Repository\SearchService::findContent()
2655
     */
2656
    public function testQueryCustomField()
2657
    {
2658
        $query = new Query(
2659
            [
2660
                'query' => new Criterion\CustomField(
2661
                    'custom_field',
2662
                    Criterion\Operator::EQ,
2663
                    'AdMiNiStRaToR'
2664
                ),
2665
                'offset' => 0,
2666
                'limit' => 10,
2667
                'sortClauses' => [new SortClause\ContentId()],
2668
            ]
2669
        );
2670
        $this->assertQueryFixture(
2671
            $query,
2672
            $this->getFixtureDir() . '/QueryCustomField.php'
2673
        );
2674
    }
2675
2676
    /**
2677
     * Test for the findContent() method.

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.