Esempio n. 1
0
 /**
  * Test parsing of capability data.
  *
  * @return void
  */
 public function testCapabilities2()
 {
     $mock = new HTTP_Request2_Adapter_Mock();
     $mock->addResponse(fopen(__DIR__ . '/responses/capabilities2.xml', 'rb'));
     $config = array('adapter' => $mock, 'server' => 'http://api06.dev.openstreetmap.org/');
     $osm = new Services_OpenStreetMap($config);
     $this->assertEquals($osm->getMinVersion(), 0.5);
     $this->assertEquals($osm->getMaxVersion(), 0.6);
     $this->assertEquals($osm->getMaxArea(), 0.25);
     $this->assertEquals($osm->getTracepointsPerPage(), 5000);
     $this->assertEquals($osm->getMaxNodes(), 2000);
     $this->assertEquals($osm->getMaxElements(), 50000);
     $this->assertEquals($osm->getDatabaseStatus(), 'online');
     $this->assertEquals($osm->getApiStatus(), 'readonly');
     $this->assertEquals($osm->getGpxStatus(), 'offline');
 }