Code Duplication    Length = 18-18 lines in 2 locations

eZ/Publish/API/Repository/Tests/URLServiceTest.php 2 locations

@@ 341-358 (lines=18) @@
338
     * @covers \eZ\Publish\Core\Repository\URLService::findUrls()
339
     * @depends eZ\Publish\API\Repository\Tests\URLServiceTest::testFindUrls
340
     */
341
    public function testFindUrlsUsingSectionIdentifierAndValidityCriterionValid(): void
342
    {
343
        $expectedUrls = [
344
            'http://windows.microsoft.com/en-US/internet-explorer/products/ie/home',
345
            'http://www.dropbox.com/',
346
            'http://www.google.de/',
347
            'http://www.apache.org/',
348
            'http://www.nginx.com/',
349
        ];
350
351
        $query = new URLQuery();
352
        $query->filter = new Criterion\LogicalAnd([
353
            new Criterion\SectionIdentifier(['media', 'users']),
354
            new Criterion\Validity(true),
355
        ]);
356
357
        $this->doTestFindUrls($query, $expectedUrls);
358
    }
359
360
    /**
361
     * Test for URLService::findUrls() method.
@@ 366-383 (lines=18) @@
363
     * @covers \eZ\Publish\Core\Repository\URLService::findUrls()
364
     * @depends eZ\Publish\API\Repository\Tests\URLServiceTest::testFindUrls
365
     */
366
    public function testFindUrlsUsingSectionIdentifierOrSectionIdCriterion(): void
367
    {
368
        $expectedUrls = [
369
            'http://windows.microsoft.com/en-US/internet-explorer/products/ie/home',
370
            'http://www.dropbox.com/',
371
            'http://www.google.de/',
372
            'http://www.apache.org/',
373
            'http://www.nginx.com/',
374
        ];
375
376
        $query = new URLQuery();
377
        $query->filter = new Criterion\LogicalOr([
378
            new Criterion\SectionIdentifier(['media']),
379
            new Criterion\SectionId([2]),
380
        ]);
381
382
        $this->doTestFindUrls($query, $expectedUrls);
383
    }
384
385
    /**
386
     * Test for URLService::findUrls() method.