Code Duplication    Length = 21-21 lines in 2 locations

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

@@ 4661-4681 (lines=21) @@
4658
     *
4659
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped
4660
     */
4661
    public function testLocationSwappedUpdatesLocationPathIdentificationString()
4662
    {
4663
        $handler = $this->getHandler();
4664
        $locationGateway = $this->getLocationGateway();
4665
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_path_identification_string.php');
4666
4667
        $countBeforeReusing = $this->countRows();
4668
4669
        $handler->locationSwapped(314, 2, 315, 2);
4670
4671
        $this->assertEquals(
4672
            $countBeforeReusing,
4673
            $this->countRows()
4674
        );
4675
4676
        $locationData = $locationGateway->getBasicNodeData(314);
4677
        self::assertEquals('dva', $locationData['path_identification_string']);
4678
4679
        $locationData = $locationGateway->getBasicNodeData(315);
4680
        self::assertEquals('jedan', $locationData['path_identification_string']);
4681
    }
4682
4683
    /**
4684
     * Test for the locationSwapped() method.
@@ 4690-4710 (lines=21) @@
4687
     *
4688
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped
4689
     */
4690
    public function testLocationSwappedMultipleLanguagesUpdatesLocationPathIdentificationString()
4691
    {
4692
        $handler = $this->getHandler();
4693
        $locationGateway = $this->getLocationGateway();
4694
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_multilang_path_identification_string.php');
4695
4696
        $countBeforeReusing = $this->countRows();
4697
4698
        $handler->locationSwapped(314, 2, 315, 2);
4699
4700
        $this->assertEquals(
4701
            $countBeforeReusing,
4702
            $this->countRows()
4703
        );
4704
4705
        $locationData = $locationGateway->getBasicNodeData(314);
4706
        self::assertEquals('zwei', $locationData['path_identification_string']);
4707
4708
        $locationData = $locationGateway->getBasicNodeData(315);
4709
        self::assertEquals('jedan', $locationData['path_identification_string']);
4710
    }
4711
4712
    /**
4713
     * @return int