Code Duplication    Length = 14-15 lines in 3 locations

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

@@ 2482-2496 (lines=15) @@
2479
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::listGlobalURLAliases
2480
     * @depends testLookupResourceUrlAlias
2481
     */
2482
    public function testListGlobalURLAliasesWithLanguageCode()
2483
    {
2484
        $handler = $this->getHandler();
2485
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_resource.php');
2486
2487
        $globalAliasList = $handler->listGlobalURLAliases('eng-GB');
2488
2489
        self::assertEquals(
2490
            [
2491
                $handler->lookup('is-alive'),
2492
                $handler->lookup('nop-element/search'),
2493
            ],
2494
            $globalAliasList
2495
        );
2496
    }
2497
2498
    /**
2499
     * Test for the listGlobalURLAliases() method.
@@ 2864-2877 (lines=14) @@
2861
     *
2862
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationCopied
2863
     */
2864
    public function testLocationCopiedCopiedLocationAliasIsValid()
2865
    {
2866
        $handler = $this->getHandler();
2867
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_copy.php');
2868
2869
        $urlAlias = $handler->lookup('move-this');
2870
2871
        $handler->locationCopied(4, 400, 3);
2872
2873
        self::assertEquals(
2874
            $urlAlias,
2875
            $handler->lookup('move-this')
2876
        );
2877
    }
2878
2879
    /**
2880
     * Test for the locationCopied() method.
@@ 2884-2897 (lines=14) @@
2881
     *
2882
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationCopied
2883
     */
2884
    public function testLocationCopiedCopiedSubtreeIsValid()
2885
    {
2886
        $handler = $this->getHandler();
2887
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_copy.php');
2888
2889
        $urlAlias = $handler->lookup('move-this/sub1/sub2');
2890
2891
        $handler->locationCopied(4, 400, 3);
2892
2893
        self::assertEquals(
2894
            $urlAlias,
2895
            $handler->lookup('move-this/sub1/sub2')
2896
        );
2897
    }
2898
2899
    /**
2900
     * Test for the locationCopied() method.