Spaltentyp Text anstelle von varchar() in diversen Tabellen Teil 2
[kivitendo-erp.git] / t / Support / TestSetup.pm
index f7b43cd..7e5774e 100644 (file)
@@ -16,6 +16,9 @@ use SL::InstanceConfiguration;
 use SL::Request;
 
 sub login {
+  $Data::Dumper::Sortkeys = 1;
+  $Data::Dumper::Indent   = 2;
+
   SL::LxOfficeConf->read;
 
   my $client = 'Unit-Tests';
@@ -27,7 +30,7 @@ sub login {
   $::lxdebug->disable_sub_tracing;
   $::locale        = Locale->new($::lx_office_conf{system}->{language});
   $::form          = Form->new;
-  $::auth          = SL::Auth->new;
+  $::auth          = SL::Auth->new(unit_tests_database => 1);
   die "Cannot find client with ID or name '$client'" if !$::auth->set_client($client);
 
   $::instance_conf = SL::InstanceConfiguration->new;
@@ -45,8 +48,6 @@ sub login {
 
   die "cannot find locale for user $login" unless $::locale   = Locale->new($::myconfig{countrycode});
 
-  $::instance_conf->init;
-
   $SIG{__DIE__} = sub { Carp::confess( @_ ) } if $::lx_office_conf{debug}->{backtrace_on_die};
 
   return 1;