public function testCreateWithDatabase() { $id = new \MongoId(); $ref = \MongoDBRef::create('foo', $id, 'database'); $this->assertSame(['$ref' => 'foo', '$id' => $id, '$db' => 'database'], $ref); }