You are here

function WeatherEsParserTestCase::testParser in Weather_es 7

Test the XML parser for AEMET data

File

./weather_es.test, line 51
Tests parsing of raw XML AEMET data.

Class

WeatherEsParserTestCase
@file Tests parsing of raw XML AEMET data.

Code

function testParser() {

  // Try to load the Jijona/Xixona weather data
  $aemet = new weather_es_Aemet('03083');
  $this
    ->assertTrue($aemet
    ->isLoadOk(), t('Data loaded ok'));
  $this
    ->assertTrue(is_array($aemet
    ->getInfo()), t('Data loaded is an array'));
}