public function testThrowsExceptionWhenMongoFailsDuringGetLastModified() { $this->imageCollection->expects($this->once())->method('find')->will($this->throwException(new MongoException())); $this->driver->getLastModified(['key']); }