public function ParserTest::testParsingOfInformation in Weather 8
Same name and namespace in other branches
- 2.0.x tests/src/Functional/ParserTest.php \Drupal\Tests\weather\Functional\ParserTest::testParsingOfInformation()
Test parsing of information about a forecast.
File
- tests/
src/ Functional/ ParserTest.php, line 517
Class
- ParserTest
- Tests parsing of XML weather forecasts.
Namespace
Drupal\Tests\weather\FunctionalCode
public function testParsingOfInformation() {
// 2013-10-07 20:00:00 UTC.
$info = $this
->getInfoAboutForecast(1381176000);
// Check that the information has been parsed correctly.
$info = reset($info);
$this
->assertEqual($info->geoid, 'geonames_2911298');
$this
->assertEqual($info->last_update, '2013-10-07 15:30:00');
$this
->assertEqual($info->next_update, '2013-10-08 04:00:00');
$this
->assertEqual($info->next_download_attempt, '2013-10-08 04:00:00');
$this
->assertEqual($info->utc_offset, 120);
}