private function WeatherParserTestCase::_getInfoAboutForecast in Weather 7.2
Same name and namespace in other branches
- 7.3 tests/parser.test \WeatherParserTestCase::_getInfoAboutForecast()
Internal helper function for getting information about a forecast.
1 call to WeatherParserTestCase::_getInfoAboutForecast()
- WeatherParserTestCase::testParsingOfInformation in tests/
parser.test - Test parsing of information about a forecast.
File
- tests/
parser.test, line 51 - Tests parsing of XML weather forecasts.
Class
- WeatherParserTestCase
- Test class for the parser.
Code
private function _getInfoAboutForecast($time) {
// Set the testing time.
variable_set('weather_time_for_testing', $time);
// Fetch weather forecasts for Hamburg.
$weather = weather_get_weather('geonames_2911298', 1, FALSE);
// Return the parsed information.
return db_query('SELECT * FROM {weather_forecast_information} WHERE geoid=:geoid', array(
':geoid' => 'geonames_2911298',
))
->fetchObject();
}