Code Duplication    Length = 14-15 lines in 3 locations

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

@@ 2430-2444 (lines=15) @@
2427
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::listGlobalURLAliases
2428
     * @depends testLookupResourceUrlAlias
2429
     */
2430
    public function testListGlobalURLAliasesWithLanguageCode()
2431
    {
2432
        $handler = $this->getHandler();
2433
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_resource.php');
2434
2435
        $globalAliasList = $handler->listGlobalURLAliases('eng-GB');
2436
2437
        self::assertEquals(
2438
            array(
2439
                $handler->lookup('is-alive'),
2440
                $handler->lookup('nop-element/search'),
2441
            ),
2442
            $globalAliasList
2443
        );
2444
    }
2445
2446
    /**
2447
     * Test for the listGlobalURLAliases() method.
@@ 2812-2825 (lines=14) @@
2809
     *
2810
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationCopied
2811
     */
2812
    public function testLocationCopiedCopiedLocationAliasIsValid()
2813
    {
2814
        $handler = $this->getHandler();
2815
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_copy.php');
2816
2817
        $urlAlias = $handler->lookup('move-this');
2818
2819
        $handler->locationCopied(4, 400, 3);
2820
2821
        self::assertEquals(
2822
            $urlAlias,
2823
            $handler->lookup('move-this')
2824
        );
2825
    }
2826
2827
    /**
2828
     * Test for the locationCopied() method.
@@ 2832-2845 (lines=14) @@
2829
     *
2830
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationCopied
2831
     */
2832
    public function testLocationCopiedCopiedSubtreeIsValid()
2833
    {
2834
        $handler = $this->getHandler();
2835
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_copy.php');
2836
2837
        $urlAlias = $handler->lookup('move-this/sub1/sub2');
2838
2839
        $handler->locationCopied(4, 400, 3);
2840
2841
        self::assertEquals(
2842
            $urlAlias,
2843
            $handler->lookup('move-this/sub1/sub2')
2844
        );
2845
    }
2846
2847
    /**
2848
     * Test for the locationCopied() method.