1--TEST-- 2Test for Services_GeoNames::cities() method. 3--FILE-- 4<?php 5require_once dirname(__FILE__) . '/setup.php'; 6 7$geo = Services_GeoNames_factory(substr(basename(__FILE__), 0, -4)); 8try { 9 $ret = $geo->cities(array( 10 'north' => 44.1, 11 'south' => -9.9, 12 'east' => -22.4, 13 'west' => 55.2 14 )); 15 print_r($ret); 16} catch (Services_GeoNames_Exception $exc) { 17 echo $exc->getMessage(); 18} 19?> 20--EXPECTF-- 21Array 22( 23 [0] => stdClass Object 24 ( 25 [fcodeName] => capital of a political entity 26 [countrycode] => MX 27 [fcl] => P 28 [fclName] => city, village,... 29 [name] => Mexico City 30 [wikipedia] => en.wikipedia.org/wiki/Mexico_City 31 [lng] => %s 32 [fcode] => PPLC 33 [geonameId] => 3530597 34 [lat] => %s 35 [population] => 11285654 36 ) 37 38 [1] => stdClass Object 39 ( 40 [fcodeName] => capital of a political entity 41 [countrycode] => PH 42 [fcl] => P 43 [fclName] => city, village,... 44 [name] => Manila 45 [wikipedia] => 46 [lng] => %s 47 [fcode] => PPLC 48 [geonameId] => 1701668 49 [lat] => %s 50 [population] => 10444527 51 ) 52 53 [2] => stdClass Object 54 ( 55 [fcodeName] => capital of a political entity 56 [countrycode] => BD 57 [fcl] => P 58 [fclName] => city, village,... 59 [name] => Dhaka 60 [wikipedia] => en.wikipedia.org/wiki/Dhaka 61 [lng] => %s 62 [fcode] => PPLC 63 [geonameId] => 1185241 64 [lat] => %s 65 [population] => 10356500 66 ) 67 68 [3] => stdClass Object 69 ( 70 [fcodeName] => capital of a political entity 71 [countrycode] => KR 72 [fcl] => P 73 [fclName] => city, village,... 74 [name] => Seoul 75 [wikipedia] => en.wikipedia.org/wiki/Seoul 76 [lng] => %s 77 [fcode] => PPLC 78 [geonameId] => 1835848 79 [lat] => %s 80 [population] => 10349312 81 ) 82 83 [4] => stdClass Object 84 ( 85 [fcodeName] => capital of a political entity 86 [countrycode] => ID 87 [fcl] => P 88 [fclName] => city, village,... 89 [name] => Jakarta 90 [wikipedia] => en.wikipedia.org/wiki/Jakarta 91 [lng] => %s 92 [fcode] => PPLC 93 [geonameId] => 1642911 94 [lat] => %s 95 [population] => 8540121 96 ) 97 98 [5] => stdClass Object 99 ( 100 [fcodeName] => capital of a political entity 101 [countrycode] => JP 102 [fcl] => P 103 [fclName] => city, village,... 104 [name] => Tokyo 105 [wikipedia] => en.wikipedia.org/wiki/Tokyo 106 [lng] => %s 107 [fcode] => PPLC 108 [geonameId] => 1850147 109 [lat] => %s 110 [population] => 8336599 111 ) 112 113 [6] => stdClass Object 114 ( 115 [fcodeName] => capital of a political entity 116 [countrycode] => TW 117 [fcl] => P 118 [fclName] => city, village,... 119 [name] => Taipei 120 [wikipedia] => en.wikipedia.org/wiki/Taipei 121 [lng] => %s 122 [fcode] => PPLC 123 [geonameId] => 1668341 124 [lat] => %s 125 [population] => 7871900 126 ) 127 128 [7] => stdClass Object 129 ( 130 [fcodeName] => capital of a political entity 131 [countrycode] => CN 132 [fcl] => P 133 [fclName] => city, village,... 134 [name] => Beijing 135 [wikipedia] => en.wikipedia.org/wiki/Beijing 136 [lng] => %s 137 [fcode] => PPLC 138 [geonameId] => 1816670 139 [lat] => %s 140 [population] => 7480601 141 ) 142 143 [8] => stdClass Object 144 ( 145 [fcodeName] => capital of a political entity 146 [countrycode] => CO 147 [fcl] => P 148 [fclName] => city, village,... 149 [name] => Bogotá 150 [wikipedia] => en.wikipedia.org/wiki/Bogot%C3%A1 151 [lng] => %s 152 [fcode] => PPLC 153 [geonameId] => 3688689 154 [lat] => %s 155 [population] => 7102602 156 ) 157 158 [9] => stdClass Object 159 ( 160 [fcodeName] => capital of a political entity 161 [countrycode] => HK 162 [fcl] => P 163 [fclName] => city, village,... 164 [name] => Hong Kong 165 [wikipedia] => 166 [lng] => %s 167 [fcode] => PPLC 168 [geonameId] => 1819729 169 [lat] => %s 170 [population] => 7012738 171 ) 172 173) 174