X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ficdt%2Foffline_mysql.t;h=c9d519707b2686949057600789f03793f8797b33;hb=2d9a96fd40eb4be24a9a254953e1e3cd8e20ea3a;hp=11302b8927a82df1b296c3138a2847d9e61ffbb9;hpb=ba31911e50a0f79051cfee608b0907a9ac83ad1d;p=dbsrgits%2FDBIx-Class.git diff --git a/t/icdt/offline_mysql.t b/t/icdt/offline_mysql.t index 11302b8..c9d5197 100644 --- a/t/icdt/offline_mysql.t +++ b/t/icdt/offline_mysql.t @@ -1,4 +1,5 @@ -use DBIx::Class::Optional::Dependencies -skip_all_without => qw( icdt_mysql ); +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } +use DBIx::Class::Optional::Dependencies -skip_all_without => qw( ic_dt_mysql ); use strict; use warnings; @@ -6,7 +7,7 @@ use warnings; use Test::More; use Test::Exception; use Test::Warn; -use lib qw(t/lib); + use DBICTest; use DBICTest::Schema; use DBIx::Class::_Util 'sigwarn_silencer'; @@ -19,7 +20,7 @@ use DBIx::Class::_Util 'sigwarn_silencer'; my $schema = DBICTest->init_schema(); -# Test "timezone" parameter +# Test "time_zone" parameter foreach my $tbl (qw/EventTZ EventTZDeprecated/) { my $event_tz = $schema->resultset($tbl)->create({ starts_at => DateTime->new(year=>2007, month=>12, day=>31, time_zone => "America/Chicago" ), @@ -33,25 +34,25 @@ foreach my $tbl (qw/EventTZ EventTZDeprecated/) { is ($event_tz->created_on->month_name, "January", 'Default locale loaded: month_name'); my $starts_at = $event_tz->starts_at; - is("$starts_at", '2007-12-31T00:00:00', 'Correct date/time using timezone'); + is("$starts_at", '2007-12-31T00:00:00', 'Correct date/time using time zone'); my $created_on = $event_tz->created_on; - is("$created_on", '2006-01-31T12:34:56', 'Correct timestamp using timezone'); - is($event_tz->created_on->time_zone->name, "America/Chicago", "Correct timezone"); + is("$created_on", '2006-01-31T12:34:56', 'Correct timestamp using time zone'); + is($event_tz->created_on->time_zone->name, "America/Chicago", "Correct time zone"); my $loaded_event = $schema->resultset($tbl)->find( $event_tz->id ); isa_ok($loaded_event->starts_at, 'DateTime', 'DateTime returned'); $starts_at = $loaded_event->starts_at; - is("$starts_at", '2007-12-31T00:00:00', 'Loaded correct date/time using timezone'); - is($starts_at->time_zone->name, 'America/Chicago', 'Correct timezone'); + is("$starts_at", '2007-12-31T00:00:00', 'Loaded correct date/time using time zone'); + is($starts_at->time_zone->name, 'America/Chicago', 'Correct time zone'); isa_ok($loaded_event->created_on, 'DateTime', 'DateTime returned'); $created_on = $loaded_event->created_on; - is("$created_on", '2006-01-31T12:34:56', 'Loaded correct timestamp using timezone'); - is($created_on->time_zone->name, 'America/Chicago', 'Correct timezone'); + is("$created_on", '2006-01-31T12:34:56', 'Loaded correct timestamp using time zone'); + is($created_on->time_zone->name, 'America/Chicago', 'Correct time zone'); - # Test floating timezone warning + # Test floating time zone warning # We expect one warning SKIP: { skip "ENV{DBIC_FLOATING_TZ_OK} was set, skipping", 1 if $ENV{DBIC_FLOATING_TZ_OK}; @@ -62,8 +63,8 @@ foreach my $tbl (qw/EventTZ EventTZDeprecated/) { created_on => DateTime->new(year=>2006, month=>1, day=>31, hour => 13, minute => 34, second => 56 ), }); }, - qr/You're using a floating timezone, please see the documentation of DBIx::Class::InflateColumn::DateTime for an explanation/, - 'Floating timezone warning' + qr/You're using a floating time zone, please see the documentation of DBIx::Class::InflateColumn::DateTime for an explanation/, + 'Floating time zone warning' ); };