Code Duplication    Length = 14-15 lines in 3 locations

eZ/Publish/Core/Persistence/Legacy/Tests/Content/UrlAlias/UrlAliasHandlerTest.php 3 locations

@@ 2206-2220 (lines=15) @@
2203
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::listGlobalURLAliases
2204
     * @depends testLookupResourceUrlAlias
2205
     */
2206
    public function testListGlobalURLAliasesWithLanguageCode()
2207
    {
2208
        $handler = $this->getHandler();
2209
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_resource.php');
2210
2211
        $globalAliasList = $handler->listGlobalURLAliases('eng-GB');
2212
2213
        self::assertEquals(
2214
            array(
2215
                $handler->lookup('is-alive'),
2216
                $handler->lookup('nop-element/search'),
2217
            ),
2218
            $globalAliasList
2219
        );
2220
    }
2221
2222
    /**
2223
     * Test for the listGlobalURLAliases() method.
@@ 2588-2601 (lines=14) @@
2585
     *
2586
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationCopied
2587
     */
2588
    public function testLocationCopiedCopiedLocationAliasIsValid()
2589
    {
2590
        $handler = $this->getHandler();
2591
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_copy.php');
2592
2593
        $urlAlias = $handler->lookup('move-this');
2594
2595
        $handler->locationCopied(4, 400, 3);
2596
2597
        self::assertEquals(
2598
            $urlAlias,
2599
            $handler->lookup('move-this')
2600
        );
2601
    }
2602
2603
    /**
2604
     * Test for the locationCopied() method.
@@ 2608-2621 (lines=14) @@
2605
     *
2606
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationCopied
2607
     */
2608
    public function testLocationCopiedCopiedSubtreeIsValid()
2609
    {
2610
        $handler = $this->getHandler();
2611
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_copy.php');
2612
2613
        $urlAlias = $handler->lookup('move-this/sub1/sub2');
2614
2615
        $handler->locationCopied(4, 400, 3);
2616
2617
        self::assertEquals(
2618
            $urlAlias,
2619
            $handler->lookup('move-this/sub1/sub2')
2620
        );
2621
    }
2622
2623
    /**
2624
     * Test for the locationCopied() method.