Ejemplo n.º 1
0
 /**
  * @param CityInterface $city
  * @param string        $unit
  *
  * @return array
  */
 protected function downloadForecast(CityInterface $city, $unit = 'c')
 {
     if ($city->getWoeid()) {
         $this->api->callApiWoeid($city->getWoeid(), $unit);
     } else {
         $this->api->callApiCityName($city->getName(), $unit);
     }
     return $this->api->getForecast();
 }
Ejemplo n.º 2
0
 public function testTemperatureUnitF()
 {
     $this->api->callApiCityName('Clermont-Ferrand', 'f');
     $this->assertRegExp('/^(-)?[0-9]+ F$/', $this->api->getTemperature(true));
 }