| 1 |
|
<?php |
| 2 |
|
/** |
| 3 |
|
* OSMTest.php |
| 4 |
|
* 25-Apr-2011 |
| 5 |
|
* |
| 6 |
|
* PHP Version 5 |
| 7 |
|
* |
| 8 |
|
* @category Services |
| 9 |
|
* @package Services_Openstreetmap |
| 10 |
|
* @subpackage UnitTesting |
| 11 |
|
* @author Ken Guest <kguest@php.net> |
| 12 |
|
* @license BSD http://www.opensource.org/licenses/bsd-license.php |
| 13 |
|
* @version Release: @package_version@ |
| 14 |
|
* @link OSMTest.php |
| 15 |
|
*/ |
| 16 |
|
|
| 17 |
|
$version = '@package_version@'; |
| 18 |
|
if (strstr($version, 'package_version')) { |
| 19 |
|
set_include_path(dirname(dirname(__FILE__)) . ':' . get_include_path()); |
| 20 |
|
} |
| 21 |
|
|
| 22 |
|
require_once 'Services/Openstreetmap.php'; |
| 23 |
|
|
| 24 |
|
require_once 'HTTP/Request2.php'; |
| 25 |
|
require_once 'HTTP/Request2/Adapter/Mock.php'; |
| 26 |
|
require_once 'PHPUnit/Framework/TestCase.php'; |
| 27 |
|
|
| 28 |
|
|
| 29 |
|
/** |
| 30 |
|
* Test Services_Openstreetmap functionality specific only to that class. |
| 31 |
|
* |
| 32 |
|
* @category Services |
| 33 |
|
* @package Services_Openstreetmap |
| 34 |
|
* @subpackage UnitTesting |
| 35 |
|
* @author Ken Guest <kguest@php.net> |
| 36 |
|
* @license BSD http://www.opensource.org/licenses/bsd-license.php |
| 37 |
|
* @link OSMTest.php |
| 38 |
|
*/ |
| 39 |
|
class OSMTest extends PHPUnit_Framework_TestCase |
| 40 |
|
{ |
| 41 |
|
public function testCreateObject() |
| 42 |
|
{ |
| 43 |
1 |
$mock = new HTTP_Request2_Adapter_Mock(); |
| 44 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/capabilities.xml', 'rb')); |
| 45 |
|
|
| 46 |
1 |
$osm = new Services_Openstreetmap(array('adapter' => $mock)); |
| 47 |
1 |
$this->assertInstanceOf('Services_Openstreetmap', $osm); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
public function testLoadXml() |
| 51 |
|
{ |
| 52 |
1 |
$mock = new HTTP_Request2_Adapter_Mock(); |
| 53 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/capabilities.xml', 'rb')); |
| 54 |
|
|
| 55 |
1 |
$osm = new Services_Openstreetmap(array('adapter' => $mock)); |
| 56 |
1 |
$this->assertEquals($osm->getXml(), null); |
| 57 |
1 |
$osm->loadXml(__DIR__ . '/files/osm.osm'); |
| 58 |
1 |
$this->assertNotEquals($osm->getXml(), null); |
| 59 |
|
|
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
public function testCapabilities() |
| 63 |
|
{ |
| 64 |
1 |
$mock = new HTTP_Request2_Adapter_Mock(); |
| 65 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/capabilities.xml', 'rb')); |
| 66 |
|
|
| 67 |
|
$config = array( |
| 68 |
1 |
'adapter' => $mock, |
| 69 |
1 |
'server' => 'http://api06.dev.openstreetmap.org/', |
| 70 |
1 |
); |
| 71 |
1 |
$osm = new Services_Openstreetmap($config); |
| 72 |
1 |
$this->assertEquals($osm->getTimeout(), 300); |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
public function testCapabilities2() |
| 76 |
|
{ |
| 77 |
1 |
$mock = new HTTP_Request2_Adapter_Mock(); |
| 78 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/capabilities2.xml', 'rb')); |
| 79 |
|
|
| 80 |
|
$config = array( |
| 81 |
1 |
'adapter' => $mock, |
| 82 |
1 |
'server' => 'http://api06.dev.openstreetmap.org/', |
| 83 |
1 |
); |
| 84 |
1 |
$osm = new Services_Openstreetmap($config); |
| 85 |
1 |
$this->assertEquals($osm->getMinVersion(), 0.5); |
| 86 |
1 |
$this->assertEquals($osm->getMaxVersion(), 0.6); |
| 87 |
1 |
$this->assertEquals($osm->getMaxArea(), 0.25); |
| 88 |
1 |
$this->assertEquals($osm->getTracepointsPerPage(), 5000); |
| 89 |
1 |
$this->assertEquals($osm->getMaxNodes(), 2000); |
| 90 |
1 |
$this->assertEquals($osm->getMaxElements(), 50000); |
| 91 |
|
} |
| 92 |
|
|
| 93 |
|
/** |
| 94 |
|
* @expectedException Services_Openstreetmap_Exception |
| 95 |
|
* @expectedExceptionMessage Specified API Version 0.6 not supported. |
| 96 |
|
* |
| 97 |
|
* @return void |
| 98 |
|
*/ |
| 99 |
|
public function testCapabilitiesMin() |
| 100 |
|
{ |
| 101 |
1 |
$mock = new HTTP_Request2_Adapter_Mock(); |
| 102 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/capabilities_min.xml', 'rb')); |
| 103 |
|
|
| 104 |
|
$config = array( |
| 105 |
1 |
'adapter' => $mock, |
| 106 |
1 |
'server' => 'http://api06.dev.openstreetmap.org/', |
| 107 |
1 |
); |
| 108 |
1 |
$osm = new Services_Openstreetmap($config); |
| 109 |
|
} |
| 110 |
|
|
| 111 |
|
/** |
| 112 |
|
* @expectedException Services_Openstreetmap_Exception |
| 113 |
|
* @expectedExceptionMessage Specified API Version 0.6 not supported. |
| 114 |
|
* |
| 115 |
|
* @return void |
| 116 |
|
*/ |
| 117 |
|
public function testCapabilitiesMax() |
| 118 |
|
{ |
| 119 |
1 |
$mock = new HTTP_Request2_Adapter_Mock(); |
| 120 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/capabilities_max.xml', 'rb')); |
| 121 |
|
|
| 122 |
|
$config = array( |
| 123 |
1 |
'adapter' => $mock, |
| 124 |
1 |
'server' => 'http://api06.dev.openstreetmap.org/', |
| 125 |
1 |
); |
| 126 |
1 |
$osm = new Services_Openstreetmap($config); |
| 127 |
|
} |
| 128 |
|
|
| 129 |
|
/** |
| 130 |
|
* @expectedException Services_Openstreetmap_Exception |
| 131 |
|
* @expectedExceptionMessage Problem checking server capabilities |
| 132 |
|
* |
| 133 |
|
* @return void |
| 134 |
|
*/ |
| 135 |
|
public function testCapabilitiesInvalid() |
| 136 |
|
{ |
| 137 |
1 |
$mock = new HTTP_Request2_Adapter_Mock(); |
| 138 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/capabilities_invalid.xml', 'rb')); |
| 139 |
|
|
| 140 |
|
$config = array( |
| 141 |
1 |
'adapter' => $mock, |
| 142 |
1 |
'server' => 'http://api06.dev.openstreetmap.org/', |
| 143 |
1 |
); |
| 144 |
1 |
$osm = new Services_Openstreetmap($config); |
| 145 |
|
} |
| 146 |
|
|
| 147 |
|
public function testGetArea() |
| 148 |
|
{ |
| 149 |
1 |
$mock = new HTTP_Request2_Adapter_Mock(); |
| 150 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/capabilities.xml', 'rb')); |
| 151 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/area.xml', 'rb')); |
| 152 |
|
|
| 153 |
|
$config = array( |
| 154 |
1 |
'adapter' => $mock, |
| 155 |
|
'server' => 'http://api06.dev.openstreetmap.org/' |
| 156 |
1 |
); |
| 157 |
1 |
$osm = new Services_Openstreetmap($config); |
| 158 |
1 |
$results = $osm->search(array("amenity" => "pharmacy")); |
| 159 |
1 |
$this->AssertTrue(empty($results)); |
| 160 |
1 |
$osm->get( |
| 161 |
1 |
52.84824191354071, -8.247245026639696, |
| 162 |
1 |
52.89957825532213, -8.174161478654796 |
| 163 |
1 |
); |
| 164 |
1 |
$results = $osm->search(array("amenity" => "pharmacy")); |
| 165 |
|
|
| 166 |
1 |
$tags = array(); |
| 167 |
1 |
foreach($results as $result) { |
| 168 |
1 |
$tags[] = $result->getTags(); |
| 169 |
1 |
} |
| 170 |
|
|
| 171 |
1 |
$this->assertEquals( |
| 172 |
1 |
$tags, |
| 173 |
|
array ( |
| 174 |
|
0 => array ( |
| 175 |
1 |
'addr:city' => 'Nenagh', |
| 176 |
1 |
'addr:country' => 'IE', |
| 177 |
1 |
'addr:housename' => '20-21', |
| 178 |
1 |
'addr:street' => 'Pearse Street', |
| 179 |
1 |
'amenity' => 'pharmacy', |
| 180 |
1 |
'building' => 'yes', |
| 181 |
1 |
'building:levels' => '3', |
| 182 |
1 |
'building:use' => 'retail', |
| 183 |
1 |
'dispensing' => 'yes', |
| 184 |
1 |
'fax' => '+353 67 34540', |
| 185 |
1 |
'name' => 'Ryans Pharmacy and Beauty Salon', |
| 186 |
1 |
'phone' => '+353 67 31464', |
| 187 |
1 |
), |
| 188 |
|
1 => array ( |
| 189 |
1 |
'addr:city' => 'Nenagh', |
| 190 |
1 |
'addr:country' => 'IE', |
| 191 |
1 |
'addr:housename' => '7', |
| 192 |
1 |
'addr:street' => 'Pearse Street', |
| 193 |
1 |
'amenity' => 'pharmacy', |
| 194 |
1 |
'building' => 'yes', |
| 195 |
1 |
'dispensing' => 'yes', |
| 196 |
1 |
'name' => 'Ray Walsh', |
| 197 |
1 |
'opening_hours' => 'Mo-Fr 09:30-19:00', |
| 198 |
1 |
'phone' => '+353 67 31249', |
| 199 |
1 |
'shop' => 'chemist', |
| 200 |
1 |
), |
| 201 |
|
2 => array ( |
| 202 |
1 |
'addr:city' => 'Nenagh', |
| 203 |
1 |
'addr:country' => 'IE', |
| 204 |
1 |
'addr:housename' => '20-21', |
| 205 |
1 |
'addr:street' => 'Pearse Street', |
| 206 |
1 |
'amenity' => 'pharmacy', |
| 207 |
1 |
'building' => 'yes', |
| 208 |
1 |
'building:levels' => '3', |
| 209 |
1 |
'building:use' => 'retail', |
| 210 |
1 |
'dispensing' => 'yes', |
| 211 |
1 |
'fax' => '+353 67 34540', |
| 212 |
1 |
'name' => 'Ryans Pharmacy and Beauty Salon', |
| 213 |
1 |
'phone' => '+353 67 31464', |
| 214 |
1 |
), |
| 215 |
|
3 => array ( |
| 216 |
1 |
'addr:city' => 'Nenagh', |
| 217 |
1 |
'addr:country' => 'IE', |
| 218 |
1 |
'addr:housenumber' => 'Unit 1A', |
| 219 |
1 |
'addr:street' => 'O\'Connors Shopping Centre', |
| 220 |
1 |
'amenity' => 'pharmacy', |
| 221 |
1 |
'name' => 'Ann Kelly\'s', |
| 222 |
|
'opening_hours' => |
| 223 |
1 |
'Mo-Th 09:00-18:00; Fr 09:00-19:30; Sa 09:00-18:00', |
| 224 |
1 |
'phone' => '+353 67 34244', |
| 225 |
1 |
), |
| 226 |
|
4 => array ( |
| 227 |
1 |
'addr:city' => 'Nenagh', |
| 228 |
1 |
'addr:country' => 'IE', |
| 229 |
1 |
'addr:housename' => '7', |
| 230 |
1 |
'addr:street' => 'Mitchell Street', |
| 231 |
1 |
'amenity' => 'pharmacy', |
| 232 |
1 |
'dispensing' => 'yes', |
| 233 |
1 |
'name' => 'Guierins', |
| 234 |
1 |
'phone' => '+353 67 31447', |
| 235 |
1 |
), |
| 236 |
|
5 => array ( |
| 237 |
1 |
'addr:city' => 'Nenagh', |
| 238 |
1 |
'addr:country' => 'IE', |
| 239 |
1 |
'addr:housenumber' => '69', |
| 240 |
1 |
'addr:street' => 'Kenyon Street', |
| 241 |
1 |
'amenity' => 'pharmacy', |
| 242 |
1 |
'dispensing' => 'yes', |
| 243 |
1 |
'name' => 'Finnerty\'s', |
| 244 |
1 |
'phone' => '+353 67 34155', |
| 245 |
1 |
), |
| 246 |
|
6 => array ( |
| 247 |
1 |
'addr:city' => 'Nenagh', |
| 248 |
1 |
'addr:country' => 'IE', |
| 249 |
1 |
'addr:housenumber' => '67', |
| 250 |
1 |
'addr:street' => 'Kenyon Street', |
| 251 |
1 |
'amenity' => 'pharmacy', |
| 252 |
1 |
'name' => 'Cuddys', |
| 253 |
1 |
'phone' => '+353 67 31262', |
| 254 |
1 |
), |
| 255 |
|
7 => array ( |
| 256 |
1 |
'addr:city' => 'Nenagh', |
| 257 |
1 |
'addr:country' => 'IE', |
| 258 |
1 |
'addr:street' => 'Clare Street', |
| 259 |
1 |
'amenity' => 'pharmacy', |
| 260 |
1 |
'dispensing' => 'yes', |
| 261 |
1 |
'fax' => '+3536742775', |
| 262 |
1 |
'name' => 'Clare Street Pharmacy', |
| 263 |
1 |
'opening_hours' => 'Mo-Sa 09:15-18:00', |
| 264 |
1 |
'phone' => '+3536742775', |
| 265 |
1 |
), |
| 266 |
|
) |
| 267 |
1 |
); |
| 268 |
|
} |
| 269 |
|
|
| 270 |
|
public function testSearchDelimited() |
| 271 |
|
{ |
| 272 |
1 |
$mock = new HTTP_Request2_Adapter_Mock(); |
| 273 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/capabilities.xml', 'rb')); |
| 274 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/area.xml', 'rb')); |
| 275 |
|
|
| 276 |
|
$config = array( |
| 277 |
1 |
'adapter' => $mock, |
| 278 |
|
'server' => 'http://api06.dev.openstreetmap.org/' |
| 279 |
1 |
); |
| 280 |
1 |
$osm = new Services_Openstreetmap($config); |
| 281 |
1 |
$results = $osm->search(array("amenity" => "pharmacy")); |
| 282 |
1 |
$this->AssertTrue(empty($results)); |
| 283 |
1 |
$osm->get( |
| 284 |
1 |
52.84824191354071, -8.247245026639696, |
| 285 |
1 |
52.89957825532213, -8.174161478654796 |
| 286 |
1 |
); |
| 287 |
1 |
$results = $osm->search(array("amenity" => "restaurant")); |
| 288 |
|
|
| 289 |
1 |
$tags = array(); |
| 290 |
1 |
foreach($results as $result) { |
| 291 |
1 |
$tags[] = $result->getTags(); |
| 292 |
1 |
} |
| 293 |
|
|
| 294 |
1 |
$this->assertEquals( |
| 295 |
1 |
$tags, |
| 296 |
|
array ( |
| 297 |
|
0 => |
| 298 |
|
array ( |
| 299 |
1 |
'addr:city' => 'Nenagh', |
| 300 |
1 |
'addr:country' => 'IE', |
| 301 |
1 |
'addr:housenumber' => '19', |
| 302 |
1 |
'addr:street' => 'Pearse Street', |
| 303 |
1 |
'amenity' => 'restaurant', |
| 304 |
1 |
'building' => 'yes', |
| 305 |
1 |
'building:levels' => '3', |
| 306 |
1 |
), |
| 307 |
|
1 => |
| 308 |
|
array ( |
| 309 |
1 |
'addr:city' => 'Nenagh', |
| 310 |
1 |
'addr:country' => 'IE', |
| 311 |
1 |
'addr:housenumber' => '26', |
| 312 |
1 |
'addr:street' => 'Kenyon Street', |
| 313 |
1 |
'amenity' => 'restaurant', |
| 314 |
1 |
'name' => 'The Peppermill', |
| 315 |
1 |
), |
| 316 |
|
2 => |
| 317 |
|
array ( |
| 318 |
1 |
'amenity' => 'restaurant', |
| 319 |
1 |
'cuisine' => 'italian', |
| 320 |
1 |
'name' => 'Pepe\'s Restaurant', |
| 321 |
1 |
), |
| 322 |
|
3 => |
| 323 |
|
array ( |
| 324 |
1 |
'addr:city' => 'Nenagh', |
| 325 |
1 |
'addr:country' => 'IE', |
| 326 |
1 |
'addr:housenumber' => '19', |
| 327 |
1 |
'addr:street' => 'Kenyon Street', |
| 328 |
1 |
'amenity' => 'restaurant', |
| 329 |
1 |
'name' => 'Simply Food', |
| 330 |
1 |
), |
| 331 |
|
4 => |
| 332 |
|
array ( |
| 333 |
1 |
'amenity' => 'restaurant', |
| 334 |
1 |
'cuisine' => 'chinese', |
| 335 |
1 |
'name' => 'Jin\'s', |
| 336 |
1 |
), |
| 337 |
|
5 => |
| 338 |
|
array ( |
| 339 |
1 |
'addr:city' => 'Nenagh', |
| 340 |
1 |
'addr:country' => 'IE', |
| 341 |
1 |
'addr:housenumber' => '23', |
| 342 |
1 |
'addr:street' => 'Sarsfield Street', |
| 343 |
1 |
'amenity' => 'pub;restaurant', |
| 344 |
1 |
'name' => 'Andy\'s', |
| 345 |
1 |
'phone' => '+353 67 32494', |
| 346 |
1 |
'tourism' => 'guest_house', |
| 347 |
1 |
'website' => 'http://www.andysnenagh.com', |
| 348 |
1 |
), |
| 349 |
|
6 => |
| 350 |
|
array ( |
| 351 |
1 |
'amenity' => 'restaurant', |
| 352 |
1 |
'cuisine' => 'chinese', |
| 353 |
1 |
'name' => 'Golden Star', |
| 354 |
1 |
'opening_hours' => 'Mo-Su 17:00-24:00', |
| 355 |
1 |
), |
| 356 |
|
7 => |
| 357 |
|
array ( |
| 358 |
1 |
'amenity' => 'restaurant', |
| 359 |
1 |
'cuisine' => 'indian', |
| 360 |
1 |
'email' => 'turbanrest@gmail.com', |
| 361 |
1 |
'name' => 'Turban', |
| 362 |
1 |
'opening_hours' => 'Mo-Su 16:30-23:00; Fr,Sa 16:30-23:30', |
| 363 |
1 |
'phone' => '+353 67 42794', |
| 364 |
1 |
), |
| 365 |
|
) |
| 366 |
1 |
); |
| 367 |
|
} |
| 368 |
|
|
| 369 |
|
public function testGetCoordsOfPlace() |
| 370 |
|
{ |
| 371 |
1 |
$mock = new HTTP_Request2_Adapter_Mock(); |
| 372 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/nominatim_search_limerick.xml', 'rb')); |
| 373 |
|
|
| 374 |
1 |
$osm = new Services_Openstreetmap(array('adapter' => $mock)); |
| 375 |
1 |
$this->AssertEquals( |
| 376 |
1 |
$osm->getCoordsOfPlace("Limerick, Ireland"), |
| 377 |
1 |
array("lat"=> "52.6612577", "lon"=> "-8.6302084") |
| 378 |
1 |
); |
| 379 |
|
} |
| 380 |
|
|
| 381 |
|
/** |
| 382 |
|
* An exception should be thrown if the place of interest can not be |
| 383 |
|
* found. |
| 384 |
|
* |
| 385 |
|
* @expectedException Services_Openstreetmap_Exception |
| 386 |
|
* @expectedExceptionMessage Could not get coords for Neeenaaa, Ireland |
| 387 |
|
* |
| 388 |
|
* @return void |
| 389 |
|
*/ |
| 390 |
|
public function testGetCoordsOfNonExistentPlace() |
| 391 |
|
{ |
| 392 |
1 |
$mock = new HTTP_Request2_Adapter_Mock(); |
| 393 |
1 |
$mock->addResponse( |
| 394 |
1 |
fopen( |
| 395 |
1 |
__DIR__ . '/responses/nominatim_search_neeenaaa.xml', |
| 396 |
|
'rb' |
| 397 |
1 |
) |
| 398 |
1 |
); |
| 399 |
|
|
| 400 |
1 |
$osm = new Services_Openstreetmap(array('adapter' => $mock)); |
| 401 |
1 |
$osm->getCoordsOfPlace('Neeenaaa, Ireland'); |
| 402 |
|
} |
| 403 |
|
|
| 404 |
|
public function testGetHistory() |
| 405 |
|
{ |
| 406 |
1 |
$id = 52245107; |
| 407 |
|
|
| 408 |
1 |
$mock = new HTTP_Request2_Adapter_Mock(); |
| 409 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/capabilities.xml', 'rb')); |
| 410 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/node.xml', 'rb')); |
| 411 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/node_history.xml', 'rb')); |
| 412 |
|
|
| 413 |
|
$config = array( |
| 414 |
1 |
'adapter' => $mock, |
| 415 |
|
'server' => 'http://api06.dev.openstreetmap.org' |
| 416 |
1 |
); |
| 417 |
1 |
$osm = new Services_Openstreetmap($config); |
| 418 |
1 |
$node = $osm->getNode($id); |
| 419 |
1 |
$history = $node->history(); |
| 420 |
1 |
foreach ($history as $key=>$version) { |
| 421 |
1 |
$this->assertEquals($version, $history[$key]); |
| 422 |
1 |
$this->assertEquals($id, $version->getId()); |
| 423 |
1 |
} |
| 424 |
|
#$history = $osm->getHistory('node', $id); |
| 425 |
|
#$xml = simplexml_load_string($history); |
| 426 |
|
#$n = $xml->xpath('//osm'); |
| 427 |
|
#$this->assertEquals($id, (int) ($n[0]->node->attributes()->id)); |
| 428 |
|
} |
| 429 |
|
|
| 430 |
|
public function testBboxToMinMax() |
| 431 |
|
{ |
| 432 |
1 |
$mock = new HTTP_Request2_Adapter_Mock(); |
| 433 |
1 |
$mock->addResponse(fopen(__DIR__ . '/responses/capabilities.xml', 'rb')); |
| 434 |
|
|
| 435 |
1 |
$config = array('adapter' => $mock); |
| 436 |
1 |
$osm = new Services_Openstreetmap($config); |
| 437 |
1 |
$this->assertEquals( |
| 438 |
1 |
$osm->bboxToMinMax( |
| 439 |
1 |
"0.0327873", "52.260074599999996", |
| 440 |
1 |
"0.0767326", "52.282047299999995" |
| 441 |
1 |
), |
| 442 |
|
array( |
| 443 |
1 |
"52.260074599999996", "0.0327873", |
| 444 |
1 |
"52.282047299999995", "0.0767326", |
| 445 |
|
) |
| 446 |
1 |
); |
| 447 |
|
} |
| 448 |
|
|
| 449 |
|
|
| 450 |
|
public function testAttribsNotSet() |
| 451 |
|
{ |
| 452 |
1 |
$node = new Services_Openstreetmap_Node(); |
| 453 |
1 |
$this->assertEquals($node->getVersion(), null); |
| 454 |
1 |
$this->assertEquals($node->getUser(), null); |
| 455 |
1 |
$this->assertEquals($node->getUid(), null); |
| 456 |
1 |
$this->assertEquals($node->getId(), null); |
| 457 |
1 |
$this->assertEquals('' . $node, ''); |
| 458 |
|
} |
| 459 |
|
} |
| 460 |
|
// vim:set et ts=4 sw=4: |
| 461 |
|
?> |