public function testShouldProperlyEncodeToJson() { $objectId = new ObjectID($this->mongoId); $this->assertSame('"' . (string) $this->mongoId . '"', json_encode($objectId)); }