/** * @group 108 */ public function testMongoCursorExceptionsDoNotBubbleUp() { /* @var $collection \MongoCollection|\PHPUnit_Framework_MockObject_MockObject */ $collection = $this->getMock('MongoCollection', array(), array(), '', false); $collection->expects(self::once())->method('update')->willThrowException(new \MongoCursorException()); $cache = new MongoDBCache($collection); self::assertFalse($cache->save('foo', 'bar')); }