/** * Test that an OpenStreetMap XML datafile can be loaded via the loadXml method. * * @return void */ public function testLoadXml() { $mock = new HTTP_Request2_Adapter_Mock(); $mock->addResponse(fopen(__DIR__ . '/responses/capabilities.xml', 'rb')); $osm = new Services_OpenStreetMap(array('adapter' => $mock)); $this->assertEquals($osm->getXml(), null); $osm->loadXml(__DIR__ . '/files/osm.osm'); $this->assertNotEquals($osm->getXml(), null); }