Code Duplication    Length = 21-21 lines in 2 locations

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

@@ 4915-4935 (lines=21) @@
4912
     *
4913
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped
4914
     */
4915
    public function testLocationSwappedUpdatesLocationPathIdentificationString()
4916
    {
4917
        $handler = $this->getHandler();
4918
        $locationGateway = $this->getLocationGateway();
4919
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_path_identification_string.php');
4920
4921
        $countBeforeReusing = $this->countRows();
4922
4923
        $handler->locationSwapped(314, 2, 315, 2);
4924
4925
        $this->assertEquals(
4926
            $countBeforeReusing,
4927
            $this->countRows()
4928
        );
4929
4930
        $locationData = $locationGateway->getBasicNodeData(314);
4931
        self::assertEquals('dva', $locationData['path_identification_string']);
4932
4933
        $locationData = $locationGateway->getBasicNodeData(315);
4934
        self::assertEquals('jedan', $locationData['path_identification_string']);
4935
    }
4936
4937
    /**
4938
     * Test for the locationSwapped() method.
@@ 4944-4964 (lines=21) @@
4941
     *
4942
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped
4943
     */
4944
    public function testLocationSwappedMultipleLanguagesUpdatesLocationPathIdentificationString()
4945
    {
4946
        $handler = $this->getHandler();
4947
        $locationGateway = $this->getLocationGateway();
4948
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_multilang_path_identification_string.php');
4949
4950
        $countBeforeReusing = $this->countRows();
4951
4952
        $handler->locationSwapped(314, 2, 315, 2);
4953
4954
        $this->assertEquals(
4955
            $countBeforeReusing,
4956
            $this->countRows()
4957
        );
4958
4959
        $locationData = $locationGateway->getBasicNodeData(314);
4960
        self::assertEquals('zwei', $locationData['path_identification_string']);
4961
4962
        $locationData = $locationGateway->getBasicNodeData(315);
4963
        self::assertEquals('jedan', $locationData['path_identification_string']);
4964
    }
4965
4966
    /**
4967
     * @return int