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

testCreate() public method

public testCreate ( )
    public function testCreate()
    {
        $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('create')->with($this->isInstanceOf('eZ\\Publish\\SPI\\Persistence\\User'))->will($this->returnValue(true));
        $this->cacheMock->expects($this->at(0))->method('clear')->with('content', 42)->will($this->returnValue(true));
        $handler = $this->persistenceCacheHandler->userHandler();
        $handler->create(new User(array('id' => 42)));
    }