X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=t%2FSupport%2FTestSetup.pm;h=037cfb547e7b06a08e857863792776c8f6fd7f61;hb=35777fef0fc261135acbd4f5457aeadb098b48d3;hp=f7b43cd0df07297232db67de1918f683b2c71267;hpb=8317b7aa1407238c9fa8d609a1795b4ee20cb2dd;p=kivitendo-erp.git diff --git a/t/Support/TestSetup.pm b/t/Support/TestSetup.pm index f7b43cd0d..037cfb547 100644 --- a/t/Support/TestSetup.pm +++ b/t/Support/TestSetup.pm @@ -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; @@ -41,12 +44,8 @@ sub login { die "cannot find user $login" unless %::myconfig = $::auth->read_user(login => $login); - $::form->{login} = $login; # normaly implicit at 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;