Changeset 2695

Show
Ignore:
Timestamp:
07/03/08 07:11:51 (20 months ago)
Author:
fumiakiy
Message:

Updated tests to be in line with the current code.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-41/t/61-to_from_xml.t

    r2252 r2695  
    5858} 
    5959 
    60 MT::BackupRestore->backup(undef, $printer, sub {}, sub {}, sub { print $_[0], "\n"; }, 0, 'UTF-8'); 
     60my @tsnow    = gmtime(time); 
     61my $metadata = { 
     62    backup_by => $chuck->name . '(ID: ' . $chuck->id . ')', 
     63    backup_on => sprintf( 
     64        "%04d-%02d-%02dT%02d:%02d:%02d", 
     65        $tsnow[5] + 1900, 
     66        $tsnow[4] + 1, 
     67        @tsnow[ 3, 2, 1, 0 ] 
     68    ), 
     69    #backup_what    => join( ',', @blog_ids ), 
     70    schema_version => MT->config->SchemaVersion, 
     71}; 
     72 
     73MT::BackupRestore->backup( 
     74    undef, # no blog_ids 
     75    $printer, sub {}, sub {}, sub { print $_[0], "\n"; },  
     76    0, 'UTF-8', 
     77    $metadata 
     78); 
    6179 
    6280use IO::String; 
    6381my $h = IO::String->new(\$backup_data); 
    6482my (%objects, %deferred, @errors); 
    65 MT::BackupRestore->restore_process_single_file($h, \%objects, \%deferred, \@errors, "4.0", 0, sub { print $_[0], "\n"; }); 
     83MT::BackupRestore->restore_process_single_file( 
     84    $h,  
     85    \%objects,  
     86    \%deferred,  
     87    \@errors,  
     88    MT->config->SchemaVersion,  
     89    0,  
     90    sub { print $_[0], "\n"; } 
     91); 
    6692 
    6793is(scalar(keys %deferred), 0, 'no deferred objects remain');