public function testSetContentState() { $this->loggerMock->expects($this->once())->method('logCall'); $innerHandlerMock = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\ObjectState\\Handler'); $this->persistenceHandlerMock->expects($this->once())->method('objectStateHandler')->will($this->returnValue($innerHandlerMock)); $innerHandlerMock->expects($this->once())->method('setContentState')->with(10, 1, 2); $cacheItemMock = $this->getMock('Stash\\Interfaces\\ItemInterface'); $this->cacheMock->expects($this->at(0))->method('clear')->with('objectstate', 'byContent', 10, 1); $handler = $this->persistenceCacheHandler->objectStateHandler(); $state = $handler->setContentState(10, 1, 2); }