From 6b8626fd76efa0c779c2a3d4944279ba7a4827df Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 16 Nov 2011 09:47:38 +0100 Subject: Update tests --- lib/Travel/Status/DE/VRR.pm | 12 +++++++----- lib/Travel/Status/DE/VRR/Result.pm | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'lib/Travel/Status') diff --git a/lib/Travel/Status/DE/VRR.pm b/lib/Travel/Status/DE/VRR.pm index 4e647c2..156e815 100644 --- a/lib/Travel/Status/DE/VRR.pm +++ b/lib/Travel/Status/DE/VRR.pm @@ -110,7 +110,7 @@ sub new { return $self; } -sub new_from_html { +sub new_from_xml { my ( $class, %opt ) = @_; my $self = { xml => $opt{xml}, }; @@ -156,10 +156,11 @@ sub results { $e_time->getAttribute('hour'), $e_time->getAttribute('minute'), ); - my $platform = $e->getAttribute('platform'); - my $line = $e_line->getAttribute('number'); - my $dest = $e_line->getAttribute('direction'); - my $info = undef; + my $platform = $e->getAttribute('platform'); + my $line = $e_line->getAttribute('number'); + my $dest = $e_line->getAttribute('direction'); + my $info = undef; + my $countdown = $e->getAttribute('countdown'); push( @results, @@ -169,6 +170,7 @@ sub results { platform => $platform, line => $line, destination => $dest, + countdown => $countdown, info => $info, ) ); diff --git a/lib/Travel/Status/DE/VRR/Result.pm b/lib/Travel/Status/DE/VRR/Result.pm index 0b2abf0..93df048 100644 --- a/lib/Travel/Status/DE/VRR/Result.pm +++ b/lib/Travel/Status/DE/VRR/Result.pm @@ -9,7 +9,9 @@ use parent 'Class::Accessor'; our $VERSION = '0.02'; Travel::Status::DE::VRR::Result->mk_ro_accessors( - qw(destination time platform line info)); + qw(destination date time platform line info + countdown type) +); sub new { my ( $obj, %conf ) = @_; -- cgit v1.2.3