public function testGetContentCount() { $expectedCount = 2; $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('getContentCount')->with(1)->will($this->returnValue($expectedCount)); //$this->logger->logCall( __METHOD__, array( 'stateId' => $stateId ) ); $handler = $this->persistenceCacheHandler->objectStateHandler(); $count = $handler->getContentCount(1); $this->assertEquals($count, $expectedCount); }