public function testValidateItem() { $collection = $this->getCollection(); $batch = new \MongoUpdateBatch($collection); $this->setExpectedException('Exception', "Expected \$item to contain 'q' key"); $batch->add([]); }