Lines 18-24
Link Here
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use DBI; |
20 |
use DBI; |
21 |
use Test::More tests => 32; |
21 |
use Test::More tests => 33; |
22 |
use Test::MockModule; |
22 |
use Test::MockModule; |
23 |
use Test::Warn; |
23 |
use Test::Warn; |
24 |
use YAML::XS; |
24 |
use YAML::XS; |
Lines 145-147
is( C4::Context->interface( 'CRON' ), 'cron', 'interface cron uc' );
Link Here
|
145 |
$ENV{HTTPS} = 'ON'; |
145 |
$ENV{HTTPS} = 'ON'; |
146 |
is( C4::Context->https_enabled, 1, "ON HTTPS env returns 1"); |
146 |
is( C4::Context->https_enabled, 1, "ON HTTPS env returns 1"); |
147 |
} |
147 |
} |
148 |
- |
148 |
|
|
|
149 |
subtest 'is_psgi_or_plack' => sub { |
150 |
plan tests => 7; |
151 |
|
152 |
local %ENV = ( no_plack => 1 ); |
153 |
is( C4::Context->is_psgi_or_plack, 0, 'no_plack' ); |
154 |
$ENV{plackishere} = 1; |
155 |
is( C4::Context->is_psgi_or_plack, 0, 'plackishere is wrong' ); |
156 |
$ENV{'plack.ishere'} = 1; |
157 |
is( C4::Context->is_psgi_or_plack, 1, 'plack.ishere' ); |
158 |
delete $ENV{'plack.ishere'}; |
159 |
is( C4::Context->is_psgi_or_plack, 0, 'plack.ishere was here' ); |
160 |
$ENV{'plack_ishere'} = 1; |
161 |
is( C4::Context->is_psgi_or_plack, 1, 'plack_ishere' ); |
162 |
delete $ENV{'plack_ishere'}; |
163 |
$ENV{'psgi_whatever'} = 1; |
164 |
is( C4::Context->is_psgi_or_plack, 1, 'psgi_whatever' ); |
165 |
delete $ENV{'psgi_whatever'}; |
166 |
$ENV{'psgi.whatever'} = 1; |
167 |
is( C4::Context->is_psgi_or_plack, 1, 'psgi.whatever' ); |
168 |
}; |