Code Duplication    Length = 23-24 lines in 2 locations

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

@@ 810-832 (lines=23) @@
807
    /**
808
     * @covers eZ\Publish\Core\Persistence\Cache\LocationHandler::setSectionForSubtree
809
     */
810
    public function testSetSectionForSubtree()
811
    {
812
        $this->loggerMock->expects($this->once())->method('logCall');
813
        $this->cacheMock
814
            ->expects($this->once())
815
            ->method('clear')
816
            ->with('content');
817
818
        $innerHandler = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\Location\\Handler');
819
        $this->persistenceHandlerMock
820
            ->expects($this->once())
821
            ->method('locationHandler')
822
            ->will($this->returnValue($innerHandler));
823
824
        $innerHandler
825
            ->expects($this->once())
826
            ->method('setSectionForSubtree')
827
            ->with(33, 2)
828
            ->will($this->returnValue(null));
829
830
        $handler = $this->persistenceCacheHandler->locationHandler();
831
        $handler->setSectionForSubtree(33, 2);
832
    }
833
834
    /**
835
     * @covers eZ\Publish\Core\Persistence\Cache\LocationHandler::changeMainLocation

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

@@ 909-932 (lines=24) @@
906
    /**
907
     * @covers eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationMoved
908
     */
909
    public function testLocationMoved()
910
    {
911
        $this->loggerMock->expects($this->once())->method('logCall');
912
913
        $innerHandler = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\UrlAlias\\Handler');
914
        $this->persistenceHandlerMock
915
            ->expects($this->once())
916
            ->method('urlAliasHandler')
917
            ->will($this->returnValue($innerHandler));
918
919
        $innerHandler
920
            ->expects($this->once())
921
            ->method('locationMoved')
922
            ->with(44, 2, 45);
923
924
        $this->cacheMock
925
            ->expects($this->once())
926
            ->method('clear')
927
            ->with('urlAlias')
928
            ->will($this->returnValue(null));
929
930
        $handler = $this->persistenceCacheHandler->urlAliasHandler();
931
        $handler->locationMoved(44, 2, 45);
932
    }
933
934
    /**
935
     * @covers eZ\Publish\Core\Persistence\Cache\UrlAliasHandler::locationDeleted