eZ\Publish\Core\Persistence\Cache\Tests\LocationHandlerTest::testChangeMainLocation PHP Method

testChangeMainLocation() public method

    public function testChangeMainLocation()
    {
        $this->loggerMock->expects($this->once())->method('logCall');
        $this->cacheMock->expects($this->at(0))->method('clear')->with('content', 30)->will($this->returnValue(true));
        $this->cacheMock->expects($this->at(1))->method('clear')->with('content', 'info', 30)->will($this->returnValue(true));
        $innerHandlerMock = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\Location\\Handler');
        $this->persistenceHandlerMock->expects($this->once())->method('locationHandler')->will($this->returnValue($innerHandlerMock));
        $innerHandlerMock->expects($this->once())->method('changeMainLocation')->with(30, 33)->will($this->returnValue(true));
        $handler = $this->persistenceCacheHandler->locationHandler();
        $handler->changeMainLocation(30, 33);
    }