public function testThrowsExceptionWhenMongoFailsDuringGetImageMimeType() { $this->imageCollection->expects($this->once())->method('findOne')->will($this->throwException(new MongoException())); $this->driver->getImageMimeType('key', 'identifier'); }