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

testLoadHasCache() public method

public testLoadHasCache ( )
    public function testLoadHasCache()
    {
        $this->loggerMock->expects($this->never())->method($this->anything());
        $cacheItemMock = $this->getMock('Stash\\Interfaces\\ItemInterface');
        $this->cacheMock->expects($this->once())->method('getItem')->with('location', 33)->will($this->returnValue($cacheItemMock));
        $cacheItemMock->expects($this->once())->method('get')->will($this->returnValue(new Location(array('id' => 33))));
        $cacheItemMock->expects($this->once())->method('isMiss')->will($this->returnValue(false));
        $this->persistenceHandlerMock->expects($this->never())->method('locationHandler');
        $cacheItemMock->expects($this->never())->method('set');
        $handler = $this->persistenceCacheHandler->locationHandler();
        $handler->load(33);
    }