View | Details | Raw Unified | Return to bug 19483
Collapse All | Expand All

(-)a/t/db_dependent/www/auth_values_input_www.t (-7 / +9 lines)
Lines 18-24 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use utf8;
20
use utf8;
21
use Test::More tests => 33;
21
use Test::More; #See plan tests => \d+ below
22
use Test::WWW::Mechanize;
22
use Test::WWW::Mechanize;
23
use XML::Simple;
23
use XML::Simple;
24
use JSON;
24
use JSON;
Lines 35-54 my $testdir = File::Spec->rel2abs( dirname(__FILE__) ); Link Here
35
my $koha_conf = $ENV{KOHA_CONF};
35
my $koha_conf = $ENV{KOHA_CONF};
36
my $xml       = XMLin($koha_conf);
36
my $xml       = XMLin($koha_conf);
37
37
38
my $user     = $ENV{KOHA_USER} || $xml->{config}->{user};
39
my $password = $ENV{KOHA_PASS} || $xml->{config}->{pass};
40
my $intranet = $ENV{KOHA_INTRANET_URL};
41
38
eval{
42
eval{
39
    use C4::Context;
43
    use C4::Context;
40
};
44
};
41
if ($@) {
45
if ($@) {
42
    plan skip_all => "Tests skip. You must have a working Context\n";
46
    plan skip_all => "Tests skip. You must have a working Context\n";
43
}
47
}
44
48
elsif (not defined $intranet) {
45
my $user     = $ENV{KOHA_USER} || $xml->{config}->{user};
46
my $password = $ENV{KOHA_PASS} || $xml->{config}->{pass};
47
my $intranet = $ENV{KOHA_INTRANET_URL};
48
49
if (not defined $intranet) {
50
    plan skip_all => "Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests\n";
49
    plan skip_all => "Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests\n";
51
}
50
}
51
else {
52
    plan tests => 33;
53
}
52
54
53
my $dbh = C4::Context->dbh;
55
my $dbh = C4::Context->dbh;
54
56
(-)a/t/db_dependent/www/batch.t (-3 / +9 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use utf8;
22
use utf8;
23
use Test::More tests => 26;
23
use Test::More; #See plan tests => \d+ below
24
use Test::WWW::Mechanize;
24
use Test::WWW::Mechanize;
25
use XML::Simple;
25
use XML::Simple;
26
use JSON;
26
use JSON;
Lines 46-55 my $user = $ENV{KOHA_USER} || $xml->{config}->{user}; Link Here
46
my $password = $ENV{KOHA_PASS} || $xml->{config}->{pass};
46
my $password = $ENV{KOHA_PASS} || $xml->{config}->{pass};
47
my $intranet = $ENV{KOHA_INTRANET_URL};
47
my $intranet = $ENV{KOHA_INTRANET_URL};
48
48
49
BAIL_OUT("You must set the environment variable KOHA_INTRANET_URL to ".
49
if (not defined $intranet) {
50
    plan skip_all =>
51
         "You must set the environment variable KOHA_INTRANET_URL to ".
50
         "point this test to your staff client. If you do not have ".
52
         "point this test to your staff client. If you do not have ".
51
         "KOHA_CONF set, you must also set KOHA_USER and KOHA_PASS for ".
53
         "KOHA_CONF set, you must also set KOHA_USER and KOHA_PASS for ".
52
         "your username and password") unless $intranet;
54
         "your username and password";
55
}
56
else {
57
    plan tests => 26;
58
}
53
59
54
$intranet =~ s#/$##;
60
$intranet =~ s#/$##;
55
61
(-)a/t/db_dependent/www/history.t (-7 / +10 lines)
Lines 21-46 use utf8; Link Here
21
use XML::Simple;
21
use XML::Simple;
22
use Encode;
22
use Encode;
23
23
24
use Test::More tests => 4;
24
use Test::More; #See plan tests => \d+ below
25
use Test::WWW::Mechanize;
25
use Test::WWW::Mechanize;
26
26
27
my $koha_conf = $ENV{KOHA_CONF};
27
my $koha_conf = $ENV{KOHA_CONF};
28
my $xml       = XMLin($koha_conf);
28
my $xml       = XMLin($koha_conf);
29
29
30
my $user     = $ENV{KOHA_USER} || $xml->{config}->{user};
31
my $password = $ENV{KOHA_PASS} || $xml->{config}->{pass};
32
my $intranet = $ENV{KOHA_INTRANET_URL};
33
34
30
eval{
35
eval{
31
    use C4::Context;
36
    use C4::Context;
32
};
37
};
33
if ($@) {
38
if ($@) {
34
    plan skip_all => "Tests skip. You must have a working Context\n";
39
    plan skip_all => "Tests skip. You must have a working Context\n";
35
}
40
}
36
41
elsif (not defined $intranet) {
37
my $user     = $ENV{KOHA_USER} || $xml->{config}->{user};
38
my $password = $ENV{KOHA_PASS} || $xml->{config}->{pass};
39
my $intranet = $ENV{KOHA_INTRANET_URL};
40
41
if (not defined $intranet) {
42
    plan skip_all => "Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests\n";
42
    plan skip_all => "Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests\n";
43
}
43
}
44
else {
45
    plan tests => 4;
46
}
44
47
45
48
46
$intranet =~ s#/$##;
49
$intranet =~ s#/$##;
(-)a/t/db_dependent/www/search_utf8.t (-3 / +5 lines)
Lines 18-24 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use utf8;
20
use utf8;
21
use Test::More tests => 66;
21
use Test::More; #See plan tests => \d+ below
22
use Test::WWW::Mechanize;
22
use Test::WWW::Mechanize;
23
use Data::Dumper;
23
use Data::Dumper;
24
use XML::Simple;
24
use XML::Simple;
Lines 66-74 if ( not defined $intranet ) { Link Here
66
   plan skip_all => "Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests\n";
66
   plan skip_all => "Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests\n";
67
}
67
}
68
# test KOHA_OPAC_URL is set
68
# test KOHA_OPAC_URL is set
69
if ( not defined $opac ) {
69
elsif ( not defined $opac ) {
70
   plan skip_all => "Tests skip. You must set env. variable KOHA_OPAC_URL to do tests\n";
70
   plan skip_all => "Tests skip. You must set env. variable KOHA_OPAC_URL to do tests\n";
71
}
71
}
72
else {
73
    plan tests => 66;
74
}
72
75
73
$intranet =~ s#/$##;
76
$intranet =~ s#/$##;
74
$opac     =~ s#/$##;
77
$opac     =~ s#/$##;
75
- 

Return to bug 19483