| 
      
            Lines 1188-1193
          EOF
      
      
        Link Here
      
     | 
  
        
          | 1188 | 
              is( $letter->{content}, $expected_content ); | 
          1188 | 
              is( $letter->{content}, $expected_content ); | 
        
        
          | 1189 | 
          };  | 
          1189 | 
          };  | 
        
        
          | 1190 | 
           | 
          1190 | 
           | 
        
            
               | 
               | 
              1191 | 
              subtest 'KohaDates::dt_from_string' => sub { | 
            
            
              | 1192 | 
                  plan tests => 1;  | 
            
            
              | 1193 | 
                  my $code = 'TEST_DATE';  | 
            
            
              | 1194 | 
                  t::lib::Mocks::mock_preference('dateformat', 'metric'); # MM/DD/YYYY | 
            
            
              | 1195 | 
                  my $biblio = $builder->build_object(  | 
            
            
              | 1196 | 
                      { | 
            
            
              | 1197 | 
                          class => 'Koha::Biblios',  | 
            
            
              | 1198 | 
                          value => { | 
            
            
              | 1199 | 
                              timestamp   => '2018-12-13 20:21:22',  | 
            
            
              | 1200 | 
                              datecreated => '2018-12-13'  | 
            
            
              | 1201 | 
                          }  | 
            
            
              | 1202 | 
                      }  | 
            
            
              | 1203 | 
                  );  | 
            
            
              | 1204 | 
                  my $template = q{[% USE KohaDates %][% KohaDates.datetime_from_string('2000-12-01').dmy %]}; | 
            
            
              | 1205 | 
               | 
            
            
              | 1206 | 
                  reset_template({ template => $template, code => $code, module => 'test' }); | 
            
            
              | 1207 | 
                  my $letter = GetPreparedLetter(  | 
            
            
              | 1208 | 
                      module => 'test',  | 
            
            
              | 1209 | 
                      letter_code => $code,  | 
            
            
              | 1210 | 
                      tables => { | 
            
            
              | 1211 | 
                          biblio => $biblio->biblionumber,  | 
            
            
              | 1212 | 
                      }  | 
            
            
              | 1213 | 
                  );  | 
            
            
              | 1214 | 
                  is( $letter->{content}, '01-12-2000' ); | 
            
            
              | 1215 | 
              };  | 
            
            
              | 1216 | 
               | 
            
        
          | 1191 | 
          subtest 'Execute TT process in a DB transaction' => sub { | 
          1217 | 
          subtest 'Execute TT process in a DB transaction' => sub { | 
        
        
          | 1192 | 
              plan tests => 2;  | 
          1218 | 
              plan tests => 2;  | 
        
        
          | 1193 | 
              my $code = 'TEST_TXN';  | 
          1219 | 
              my $code = 'TEST_TXN';  | 
        
            
              | 1194 | 
              -   | 
               | 
               |