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

testDeleteRole() public method

public testDeleteRole ( )
    public function testDeleteRole()
    {
        $this->loggerMock->expects($this->once())->method('logCall');
        $innerHandlerMock = $this->getMock('eZ\\Publish\\SPI\\Persistence\\User\\Handler');
        $this->persistenceHandlerMock->expects($this->once())->method('userHandler')->will($this->returnValue($innerHandlerMock));
        $innerHandlerMock->expects($this->once())->method('deleteRole')->with(33)->will($this->returnValue(true));
        $this->cacheMock->expects($this->at(0))->method('clear')->with('user', 'role', 33)->will($this->returnValue(true));
        $this->cacheMock->expects($this->at(1))->method('clear')->with('user', 'role', 'assignments')->will($this->returnValue(true));
        $handler = $this->persistenceCacheHandler->userHandler();
        $handler->deleteRole(33);
    }