Changeset 2884

Show
Ignore:
Timestamp:
08/01/08 22:31:29 (4 months ago)
Author:
mpaschal
Message:

Make sure we initialize MT::ObjectDriverFactory by having asked for *some* MT instance
Report failure to save test Ddltest::Fixables in case, say, we try to save them with no ids because the Pg driver has no pk_generator from MT::ObjectDriverFactory having not been initialized
BugzID: 80847

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-42/t/ddl-tests.pl

    r2879 r2884  
    399399        my $obj = Ddltest::Fixable->new; 
    400400        $obj->foo($i); 
    401         $obj->save
     401        $obj->save or die "Could not add test Fixable record: " . $obj->errstr
    402402    } 
    403403 
  • branches/release-42/t/lib/MT/Test.pm

    r2865 r2884  
    5858        } 
    5959    } 
     60 
     61    # We need *some* instance created up front, to initialize the database 
     62    # factory etc properly, so do so now. 
     63    MT->instance; 
     64 
    6065    # Export requested or all exportable functions. 
    6166    $pkg->export_to_level(1, @to_export || qw( :DEFAULT ));