Revision d31f77ea
Von Sven Schöling vor mehr als 11 Jahren hinzugefügt
t/Support/TestSetup.pm | ||
---|---|---|
15 | 15 |
use SL::Request; |
16 | 16 |
|
17 | 17 |
sub _login { |
18 |
my $login = shift;
|
|
18 |
my ($client, $login) = @_;
|
|
19 | 19 |
|
20 |
die 'need login' unless $login;
|
|
20 |
die 'need client and login' unless $client && $login;
|
|
21 | 21 |
|
22 | 22 |
package main; |
23 | 23 |
|
... | ... | |
26 | 26 |
$::locale = Locale->new($::lx_office_conf{system}->{language}); |
27 | 27 |
$::form = Form->new; |
28 | 28 |
$::auth = SL::Auth->new; |
29 |
die "Cannot find client with ID or name '$client'" if !$::auth->set_client($client); |
|
30 |
|
|
29 | 31 |
$::instance_conf = SL::InstanceConfiguration->new; |
30 | 32 |
$::request = SL::Request->new( cgi => CGI->new({}), layout => SL::Layout::None->new ); |
31 | 33 |
|
... | ... | |
50 | 52 |
SL::LxOfficeConf->read; |
51 | 53 |
|
52 | 54 |
my $login = shift || $::lx_office_conf{testing}{login} || 'demo'; |
53 |
_login($login); |
|
55 |
my $client = shift || $::lx_office_conf{testing}{client} || ''; |
|
56 |
_login($client, $login); |
|
54 | 57 |
} |
55 | 58 |
|
56 | 59 |
1; |
Auch abrufbar als: Unified diff
TestSetup auf clients angepasst