Пример #1
0
 public function testSetGeoPoint()
 {
     $obj = new Object("TestObject");
     $obj->set("location", new GeoPoint(39.9, 116.4));
     $obj->save();
     $obj2 = new Object("TestObject", $obj->getObjectId());
     $obj2->fetch();
     $loc = $obj2->get("location");
     $this->assertTrue($loc instanceof GeoPoint);
     $this->assertEquals(39.9, $loc->getLatitude());
     $this->assertEquals(116.4, $loc->getLongitude());
 }