projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CustomerVendor: Abfragen in Transaktionen ausführen
[kivitendo-erp.git]
/
t
/
Support
/
TestSetup.pm
diff --git
a/t/Support/TestSetup.pm
b/t/Support/TestSetup.pm
index
081e7b1
..
c8095a9
100644
(file)
--- a/
t/Support/TestSetup.pm
+++ b/
t/Support/TestSetup.pm
@@
-15,10
+15,11
@@
use SL::LxOfficeConf;
use SL::InstanceConfiguration;
use SL::Request;
use SL::InstanceConfiguration;
use SL::Request;
-sub
_
login {
-
my ($client, $login) = @_
;
+sub login {
+
SL::LxOfficeConf->read
;
- die 'need client and login' unless $client && $login;
+ my $client = 'Unit-Tests';
+ my $login = 'unittests';
package main;
package main;
@@
-26,7
+27,7
@@
sub _login {
$::lxdebug->disable_sub_tracing;
$::locale = Locale->new($::lx_office_conf{system}->{language});
$::form = Form->new;
$::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;
die "Cannot find client with ID or name '$client'" if !$::auth->set_client($client);
$::instance_conf = SL::InstanceConfiguration->new;
@@
-46,15
+47,9
@@
sub _login {
$::instance_conf->init;
$::instance_conf->init;
- return 1;
-}
-
-sub login {
- SL::LxOfficeConf->read;
+ $SIG{__DIE__} = sub { Carp::confess( @_ ) } if $::lx_office_conf{debug}->{backtrace_on_die};
- my $login = shift || $::lx_office_conf{testing}{login} || 'demo';
- my $client = shift || $::lx_office_conf{testing}{client} || '';
- _login($client, $login);
+ return 1;
}
sub templates_cache_writable {
}
sub templates_cache_writable {