public function testBatchInsertWithEmptyKey() { $this->setExpectedException('MongoException', 'zero-length keys are not allowed, did you use $ with double quotes?'); $documents = [['' => 'foo']]; $this->getCollection()->batchInsert($documents); }