Revision 8317b7aa
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
t/Support/TestSetup.pm | ||
---|---|---|
15 | 15 |
use SL::InstanceConfiguration; |
16 | 16 |
use SL::Request; |
17 | 17 |
|
18 |
sub _login {
|
|
19 |
my ($client, $login) = @_;
|
|
18 |
sub login { |
|
19 |
SL::LxOfficeConf->read;
|
|
20 | 20 |
|
21 |
die 'need client and login' unless $client && $login; |
|
21 |
my $client = 'Unit-Tests'; |
|
22 |
my $login = 'unittests'; |
|
22 | 23 |
|
23 | 24 |
package main; |
24 | 25 |
|
... | ... | |
51 | 52 |
return 1; |
52 | 53 |
} |
53 | 54 |
|
54 |
sub login { |
|
55 |
SL::LxOfficeConf->read; |
|
56 |
|
|
57 |
my $login = shift || $::lx_office_conf{testing}{login} || 'demo'; |
|
58 |
my $client = shift || $::lx_office_conf{testing}{client} || ''; |
|
59 |
_login($client, $login); |
|
60 |
} |
|
61 |
|
|
62 | 55 |
sub templates_cache_writable { |
63 | 56 |
my $dir = $::lx_office_conf{paths}->{userspath} . '/templates-cache'; |
64 | 57 |
return 1 if -w $dir; |
Auch abrufbar als: Unified diff
Tests: eigene Datenbank für Unit-Tests hochziehen