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