public function testToArray() { $vector2 = new CM_Geometry_Vector2(2, 3.4); $this->assertSame(['x' => 2.0, 'y' => 3.4], $vector2->toArray()); }
public function toArray() { return array_merge(parent::toArray(), ['z' => $this->getZ()]); }