"Fossies" - the Fresh Open Source Software Archive

Member "email-reminder-0.8.1/t/manip.t" (14 Mar 2015, 1023 Bytes) of package /linux/privat/email-reminder-0.8.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/perl
    2 
    3 use strict;
    4 use warnings;
    5 
    6 use Test::More tests => 5;
    7 
    8 use EmailReminder::EventList;
    9 use EmailReminder::Event;
   10 
   11 # load the data in
   12 my $er = EmailReminder::EventList->new('t/data.xml', 1);
   13 
   14 # create a few events but change some details
   15 my $event;
   16 
   17 # add a yearly event first
   18 $event = $er->create_event( EmailReminder::YearlyEvent->get_type() );
   19 isa_ok($event, 'EmailReminder::YearlyEvent', 'yearly event');
   20 
   21 # monthly
   22 $event = $er->create_event( EmailReminder::MonthlyEvent->get_type() );
   23 isa_ok($event, 'EmailReminder::MonthlyEvent', 'monthly event');
   24 
   25 # weekly
   26 $event = $er->create_event( EmailReminder::WeeklyEvent->get_type() );
   27 isa_ok($event, 'EmailReminder::WeeklyEvent', 'weekly event');
   28 
   29 # birthday
   30 $event = $er->create_event( EmailReminder::BirthdayEvent->get_type() );
   31 isa_ok($event, 'EmailReminder::BirthdayEvent', 'birthday event');
   32 
   33 # anniversary
   34 $event = $er->create_event( EmailReminder::AnniversaryEvent->get_type() );
   35 isa_ok($event, 'EmailReminder::AnniversaryEvent', 'anniversary event');