Code Duplication    Length = 21-21 lines in 2 locations

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

@@ 4899-4919 (lines=21) @@
4896
     *
4897
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped
4898
     */
4899
    public function testLocationSwappedUpdatesLocationPathIdentificationString()
4900
    {
4901
        $handler = $this->getHandler();
4902
        $locationGateway = $this->getLocationGateway();
4903
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_path_identification_string.php');
4904
4905
        $countBeforeReusing = $this->countRows();
4906
4907
        $handler->locationSwapped(314, 2, 315, 2);
4908
4909
        $this->assertEquals(
4910
            $countBeforeReusing,
4911
            $this->countRows()
4912
        );
4913
4914
        $locationData = $locationGateway->getBasicNodeData(314);
4915
        self::assertEquals('dva', $locationData['path_identification_string']);
4916
4917
        $locationData = $locationGateway->getBasicNodeData(315);
4918
        self::assertEquals('jedan', $locationData['path_identification_string']);
4919
    }
4920
4921
    /**
4922
     * Test for the locationSwapped() method.
@@ 4928-4948 (lines=21) @@
4925
     *
4926
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped
4927
     */
4928
    public function testLocationSwappedMultipleLanguagesUpdatesLocationPathIdentificationString()
4929
    {
4930
        $handler = $this->getHandler();
4931
        $locationGateway = $this->getLocationGateway();
4932
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_multilang_path_identification_string.php');
4933
4934
        $countBeforeReusing = $this->countRows();
4935
4936
        $handler->locationSwapped(314, 2, 315, 2);
4937
4938
        $this->assertEquals(
4939
            $countBeforeReusing,
4940
            $this->countRows()
4941
        );
4942
4943
        $locationData = $locationGateway->getBasicNodeData(314);
4944
        self::assertEquals('zwei', $locationData['path_identification_string']);
4945
4946
        $locationData = $locationGateway->getBasicNodeData(315);
4947
        self::assertEquals('jedan', $locationData['path_identification_string']);
4948
    }
4949
4950
    /**
4951
     * @return int