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

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