| Lines 5-11
          use DateTime;
      
      
        Link Here | 
        
          | 5 | use DateTime::TimeZone; | 5 | use DateTime::TimeZone; | 
        
          | 6 |  | 6 |  | 
        
          | 7 | use C4::Context; | 7 | use C4::Context; | 
          
            
              | 8 | use Test::More tests => 27; | 8 | use Test::More tests => 29; | 
        
          | 9 | use Test::MockModule; | 9 | use Test::MockModule; | 
        
          | 10 |  | 10 |  | 
        
          | 11 | BEGIN { use_ok('Koha::DateUtils'); } | 11 | BEGIN { use_ok('Koha::DateUtils'); } | 
  
    | Lines 108-110
          cmp_ok( $formatted, 'eq', '16/06/2011 12:00', 'format_sqldatetime conversion' );
      
      
        Link Here | 
        
          | 108 | $formatted = format_sqldatetime( undef, 'metric' ); | 108 | $formatted = format_sqldatetime( undef, 'metric' ); | 
        
          | 109 | cmp_ok( $formatted, 'eq', q{}, | 109 | cmp_ok( $formatted, 'eq', q{}, | 
        
          | 110 |     'format_sqldatetime formats undef as empty string' ); | 110 |     'format_sqldatetime formats undef as empty string' ); | 
          
            
              | 111 | -  | 111 |  | 
            
              |  |  | 112 | $dt = DateTime->new( | 
            
              | 113 |     year       => 2013, | 
            
              | 114 |     month      => 12, | 
            
              | 115 |     day        => 11, | 
            
              | 116 |     hour       => 23, | 
            
              | 117 |     minute     => 59, | 
            
              | 118 | ); | 
            
              | 119 | $date_string = output_pref({ dt => $dt, dateformat => 'metric', timeformat => '24hr' }); | 
            
              | 120 | cmp_ok $date_string, 'eq', '11/12/2013', 'metric output'; | 
            
              | 121 |  | 
            
              | 122 | $date_string = output_pref({ dt => $dt, dateformat => 'metric', timeformat => '24hr', dateonly => 1 }); | 
            
              | 123 | cmp_ok $date_string, 'eq', '11/12/2013', 'metric output'; |