Code Duplication    Length = 14-15 lines in 3 locations

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

@@ 2472-2486 (lines=15) @@
2469
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::listGlobalURLAliases
2470
     * @depends testLookupResourceUrlAlias
2471
     */
2472
    public function testListGlobalURLAliasesWithLanguageCode()
2473
    {
2474
        $handler = $this->getHandler();
2475
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_resource.php');
2476
2477
        $globalAliasList = $handler->listGlobalURLAliases('eng-GB');
2478
2479
        self::assertEquals(
2480
            [
2481
                $handler->lookup('is-alive'),
2482
                $handler->lookup('nop-element/search'),
2483
            ],
2484
            $globalAliasList
2485
        );
2486
    }
2487
2488
    /**
2489
     * Test for the listGlobalURLAliases() method.
@@ 2855-2868 (lines=14) @@
2852
     *
2853
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationCopied
2854
     */
2855
    public function testLocationCopiedCopiedLocationAliasIsValid()
2856
    {
2857
        $handler = $this->getHandler();
2858
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_copy.php');
2859
2860
        $urlAlias = $handler->lookup('move-this');
2861
2862
        $handler->locationCopied(4, 400, 3);
2863
2864
        self::assertEquals(
2865
            $urlAlias,
2866
            $handler->lookup('move-this')
2867
        );
2868
    }
2869
2870
    /**
2871
     * Test for the locationCopied() method.
@@ 2875-2888 (lines=14) @@
2872
     *
2873
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationCopied
2874
     */
2875
    public function testLocationCopiedCopiedSubtreeIsValid()
2876
    {
2877
        $handler = $this->getHandler();
2878
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_copy.php');
2879
2880
        $urlAlias = $handler->lookup('move-this/sub1/sub2');
2881
2882
        $handler->locationCopied(4, 400, 3);
2883
2884
        self::assertEquals(
2885
            $urlAlias,
2886
            $handler->lookup('move-this/sub1/sub2')
2887
        );
2888
    }
2889
2890
    /**
2891
     * Test for the locationCopied() method.