Code Duplication    Length = 23-24 lines in 2 locations

eZ/Publish/Core/Persistence/Cache/Tests/UrlAliasHandlerTest.php 1 location

@@ 1052-1075 (lines=24) @@
1049
    /**
1050
     * @covers eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationMoved
1051
     */
1052
    public function testLocationMoved()
1053
    {
1054
        $this->loggerMock->expects($this->once())->method('logCall');
1055
1056
        $innerHandler = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\UrlAlias\\Handler');
1057
        $this->persistenceHandlerMock
1058
            ->expects($this->once())
1059
            ->method('urlAliasHandler')
1060
            ->will($this->returnValue($innerHandler));
1061
1062
        $innerHandler
1063
            ->expects($this->once())
1064
            ->method('locationMoved')
1065
            ->with(44, 2, 45);
1066
1067
        $this->cacheMock
1068
            ->expects($this->once())
1069
            ->method('clear')
1070
            ->with('urlAlias')
1071
            ->will($this->returnValue(null));
1072
1073
        $handler = $this->persistenceCacheHandler->urlAliasHandler();
1074
        $handler->locationMoved(44, 2, 45);
1075
    }
1076
1077
    /**
1078
     * @covers eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationDeleted

eZ/Publish/Core/Persistence/Cache/Tests/LocationHandlerTest.php 1 location

@@ 856-878 (lines=23) @@
853
    /**
854
     * @covers eZ\Publish\Core\Persistence\Cache\LocationHandler::setSectionForSubtree
855
     */
856
    public function testSetSectionForSubtree()
857
    {
858
        $this->loggerMock->expects($this->once())->method('logCall');
859
        $this->cacheMock
860
            ->expects($this->once())
861
            ->method('clear')
862
            ->with('content');
863
864
        $innerHandler = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\Location\\Handler');
865
        $this->persistenceHandlerMock
866
            ->expects($this->once())
867
            ->method('locationHandler')
868
            ->will($this->returnValue($innerHandler));
869
870
        $innerHandler
871
            ->expects($this->once())
872
            ->method('setSectionForSubtree')
873
            ->with(33, 2)
874
            ->will($this->returnValue(null));
875
876
        $handler = $this->persistenceCacheHandler->locationHandler();
877
        $handler->setSectionForSubtree(33, 2);
878
    }
879
880
    /**
881
     * @covers eZ\Publish\Core\Persistence\Cache\LocationHandler::changeMainLocation