public function testDefineId_AsMongoIdClass() { $id = new \MongoId(); $document = $this->collection->createDocument()->defineId($id); $this->assertEquals($id, $document->getId()); }