eZ\Publish\Core\Persistence\Cache\Tests\UserHandlerTest::testLoadRoleHasCache PHP Method

testLoadRoleHasCache() public method

    public function testLoadRoleHasCache()
    {
        $this->loggerMock->expects($this->never())->method('logCall');
        $cacheItemMock = $this->getMock('Stash\\Interfaces\\ItemInterface');
        $this->cacheMock->expects($this->once())->method('getItem')->with('user', 'role', 33)->will($this->returnValue($cacheItemMock));
        $cacheItemMock->expects($this->once())->method('get')->will($this->returnValue(new Role()));
        $cacheItemMock->expects($this->once())->method('isMiss')->will($this->returnValue(false));
        $this->persistenceHandlerMock->expects($this->never())->method($this->anything());
        $cacheItemMock->expects($this->never())->method('set');
        $handler = $this->persistenceCacheHandler->userHandler();
        $handler->loadRole(33);
    }