Code Duplication    Length = 21-21 lines in 2 locations

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

@@ 4868-4888 (lines=21) @@
4865
     *
4866
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped
4867
     */
4868
    public function testLocationSwappedUpdatesLocationPathIdentificationString()
4869
    {
4870
        $handler = $this->getHandler();
4871
        $locationGateway = $this->getLocationGateway();
4872
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_path_identification_string.php');
4873
4874
        $countBeforeReusing = $this->countRows();
4875
4876
        $handler->locationSwapped(314, 2, 315, 2);
4877
4878
        $this->assertEquals(
4879
            $countBeforeReusing,
4880
            $this->countRows()
4881
        );
4882
4883
        $locationData = $locationGateway->getBasicNodeData(314);
4884
        self::assertEquals('dva', $locationData['path_identification_string']);
4885
4886
        $locationData = $locationGateway->getBasicNodeData(315);
4887
        self::assertEquals('jedan', $locationData['path_identification_string']);
4888
    }
4889
4890
    /**
4891
     * Test for the locationSwapped() method.
@@ 4897-4917 (lines=21) @@
4894
     *
4895
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped
4896
     */
4897
    public function testLocationSwappedMultipleLanguagesUpdatesLocationPathIdentificationString()
4898
    {
4899
        $handler = $this->getHandler();
4900
        $locationGateway = $this->getLocationGateway();
4901
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_multilang_path_identification_string.php');
4902
4903
        $countBeforeReusing = $this->countRows();
4904
4905
        $handler->locationSwapped(314, 2, 315, 2);
4906
4907
        $this->assertEquals(
4908
            $countBeforeReusing,
4909
            $this->countRows()
4910
        );
4911
4912
        $locationData = $locationGateway->getBasicNodeData(314);
4913
        self::assertEquals('zwei', $locationData['path_identification_string']);
4914
4915
        $locationData = $locationGateway->getBasicNodeData(315);
4916
        self::assertEquals('jedan', $locationData['path_identification_string']);
4917
    }
4918
4919
    /**
4920
     * @return int