Lines 9-15
use Koha::Exceptions::File;
Link Here
|
9 |
#file diagnostics are more throughly tested in t/Koha/File.t |
9 |
#file diagnostics are more throughly tested in t/Koha/File.t |
10 |
subtest "Catch File-exception and inspect diagnostics", \&getDiagnostics; |
10 |
subtest "Catch File-exception and inspect diagnostics", \&getDiagnostics; |
11 |
sub getDiagnostics { |
11 |
sub getDiagnostics { |
12 |
my $file = $ENV{KOHA_PATH}.'/kohaversion.pl'; |
12 |
my $koha_path= $ENV{KOHA_PATH} // q{.}; |
|
|
13 |
my $file = $koha_path . '/kohaversion.pl'; |
13 |
my $parentDir = File::Basename::dirname($file); |
14 |
my $parentDir = File::Basename::dirname($file); |
14 |
try { |
15 |
try { |
15 |
Koha::Exceptions::File->throw(error => "error", path => $file); |
16 |
Koha::Exceptions::File->throw(error => "error", path => $file); |
Lines 19-25
sub getDiagnostics {
Link Here
|
19 |
like($e->stat, qr/^\w+/, "Then the file diagnostics look legit"); |
20 |
like($e->stat, qr/^\w+/, "Then the file diagnostics look legit"); |
20 |
}; |
21 |
}; |
21 |
|
22 |
|
22 |
$file = $ENV{KOHA_PATH}.'/koha-aversion.pl'; |
23 |
$file = $koha_path . '/koha-aversion.pl'; |
23 |
try { |
24 |
try { |
24 |
Koha::Exceptions::File->throw(error => "error", path => $file); |
25 |
Koha::Exceptions::File->throw(error => "error", path => $file); |
25 |
ok(0, "??Why no throw exception??"); |
26 |
ok(0, "??Why no throw exception??"); |