View | Details | Raw Unified | Return to bug 27937
Collapse All | Expand All

(-)a/t/DateUtils.t (-3 / +7 lines)
Lines 4-10 use DateTime::TimeZone; Link Here
4
4
5
use C4::Context;
5
use C4::Context;
6
6
7
use Test::More tests => 79;
7
use Test::More tests => 81;
8
8
9
use Test::MockModule;
9
use Test::MockModule;
10
use Test::Warn;
10
use Test::Warn;
Lines 22-29 my $tz = C4::Context->tz; Link Here
22
22
23
isa_ok( $tz, 'DateTime::TimeZone', 'Context returns timezone object' );
23
isa_ok( $tz, 'DateTime::TimeZone', 'Context returns timezone object' );
24
24
25
my $testdate_iso = '2011-06-16';                   # Bloomsday 2011
25
my $testdate_iso = '2011-6-16';
26
my $dt = dt_from_string( $testdate_iso, 'iso' );
26
my $dt = dt_from_string( $testdate_iso, 'iso' );
27
isa_ok( $dt, 'DateTime', 'dt_from_string returns a DateTime object' );
28
cmp_ok( $dt->ymd(), 'eq', '2011-06-16', 'Returned object is standardized to 2 digit day' );
29
30
$testdate_iso = '2011-06-16';                   # Bloomsday 2011
31
$dt = dt_from_string( $testdate_iso, 'iso' );
27
32
28
isa_ok( $dt, 'DateTime', 'dt_from_string returns a DateTime object' );
33
isa_ok( $dt, 'DateTime', 'dt_from_string returns a DateTime object' );
29
34
30
- 

Return to bug 27937