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

(-)a/t/Koha/Plugins/HtmlScrubber.t (-1 / +2 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 2;
20
use Test::More tests => 3;
21
use Test::NoWarnings;
21
use Template;
22
use Template;
22
23
23
subtest 'test scrubbing using default scrubber' => sub {
24
subtest 'test scrubbing using default scrubber' => sub {
(-)a/t/db_dependent/AuthorisedValues.t (-1 / +2 lines)
Lines 1-7 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use Test::More tests => 17;
4
use Test::More tests => 18;
5
use Test::NoWarnings;
5
use Test::Exception;
6
use Test::Exception;
6
use Try::Tiny;
7
use Try::Tiny;
7
8
(-)a/t/db_dependent/Koha/Acquisition/Booksellers.t (-1 / +2 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 => 8;
21
use Test::More tests => 9;
22
use Test::NoWarnings;
22
23
23
use t::lib::TestBuilder;
24
use t::lib::TestBuilder;
24
25
(-)a/t/db_dependent/Koha/Auth/TwoFactorAuth.t (-1 / +2 lines)
Lines 1-7 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use Test::More tests => 3;
4
use Test::More tests => 4;
5
use Test::NoWarnings;
5
use Test::Exception;
6
use Test::Exception;
6
use Test::MockModule;
7
use Test::MockModule;
7
8
(-)a/t/db_dependent/Koha/Authority.t (-1 / +2 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Test::More tests => 1;
22
use Test::More tests => 2;
23
use Test::NoWarnings;
23
24
24
use C4::AuthoritiesMarc;
25
use C4::AuthoritiesMarc;
25
use Koha::Authorities;
26
use Koha::Authorities;
(-)a/t/db_dependent/Koha/BackgroundJob.t (-1 / +2 lines)
Lines 19-25 use Modern::Perl; Link Here
19
use utf8;
19
use utf8;
20
use Encode;
20
use Encode;
21
21
22
use Test::More tests => 6;
22
use Test::More tests => 7;
23
use Test::NoWarnings;
23
use Test::MockModule;
24
use Test::MockModule;
24
use Test::Exception;
25
use Test::Exception;
25
use Test::Warn;
26
use Test::Warn;
(-)a/t/db_dependent/Koha/Encryption.t (-1 / +2 lines)
Lines 1-6 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
2
3
use Test::More tests => 2;
3
use Test::More tests => 3;
4
use Test::NoWarnings;
4
use Test::Exception;
5
use Test::Exception;
5
use t::lib::Mocks;
6
use t::lib::Mocks;
6
use Koha::Encryption;
7
use Koha::Encryption;
(-)a/t/db_dependent/Koha/ILL/Request/Workflow/ConfirmAuto.t (-1 / +2 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 5;
20
use Test::More tests => 6;
21
use Test::NoWarnings;
21
22
22
use Test::MockModule;
23
use Test::MockModule;
23
use Test::MockObject;
24
use Test::MockObject;
(-)a/t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t (-1 / +2 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 2;
20
use Test::More tests => 3;
21
use Test::NoWarnings;
21
22
22
use Test::MockModule;
23
use Test::MockModule;
23
use Test::MockObject;
24
use Test::MockObject;
(-)a/t/db_dependent/Koha/Plugins/ILL/Backends.t (-1 / +2 lines)
Lines 16-22 Link Here
16
16
17
use Modern::Perl;
17
use Modern::Perl;
18
use File::Basename;
18
use File::Basename;
19
use Test::More tests => 4;
19
use Test::More tests => 5;
20
use Test::NoWarnings;
20
21
21
use t::lib::Mocks;
22
use t::lib::Mocks;
22
use t::lib::TestBuilder;
23
use t::lib::TestBuilder;
(-)a/t/db_dependent/Koha/Plugins/Overdues.t (-1 / +2 lines)
Lines 16-22 Link Here
16
16
17
use Modern::Perl;
17
use Modern::Perl;
18
18
19
use Test::More tests => 8;
19
use Test::More tests => 9;
20
use Test::NoWarnings;
20
use Test::Warn;
21
use Test::Warn;
21
22
22
use C4::Overdues qw(CalcFine);
23
use C4::Overdues qw(CalcFine);
(-)a/t/db_dependent/Koha/Pseudonymization.t (-1 / +2 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Test::More tests => 3;
22
use Test::More tests => 4;
23
use Test::NoWarnings;
23
use Test::Warn;
24
use Test::Warn;
24
use Try::Tiny;
25
use Try::Tiny;
25
26
(-)a/t/db_dependent/Koha/REST/Plugin/Auth/PublicRoutes.t (-1 / +2 lines)
Lines 71-77 post '/public_guarantor' => sub { Link Here
71
    }
71
    }
72
};
72
};
73
73
74
use Test::More tests => 2;
74
use Test::More tests => 3;
75
use Test::NoWarnings;
75
use Test::Mojo;
76
use Test::Mojo;
76
77
77
use t::lib::Mocks;
78
use t::lib::Mocks;
(-)a/t/db_dependent/Patron/Borrower_Discharge.t (-1 / +2 lines)
Lines 16-22 Link Here
16
16
17
use Modern::Perl;
17
use Modern::Perl;
18
18
19
use Test::More tests => 32;
19
use Test::More tests => 33;
20
use Test::NoWarnings;
20
21
21
use Test::MockModule;
22
use Test::MockModule;
22
use Test::Warn;
23
use Test::Warn;
(-)a/t/db_dependent/misc/translator/xgettext.pl.t (-1 / +2 lines)
Lines 6-12 use File::Slurp; Link Here
6
use File::Temp qw(tempdir);
6
use File::Temp qw(tempdir);
7
use FindBin    qw($Bin);
7
use FindBin    qw($Bin);
8
use Locale::PO;
8
use Locale::PO;
9
use Test::More tests => 20;
9
use Test::More tests => 21;
10
use Test::NoWarnings;
10
11
11
my $tempdir = tempdir( CLEANUP => 1 );
12
my $tempdir = tempdir( CLEANUP => 1 );
12
13
(-)a/t/db_dependent/mojo/rest-auth.t (-1 / +2 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Test::More tests => 2;
5
use Test::More tests => 3;
6
use Test::NoWarnings;
6
use Test::Mojo;
7
use Test::Mojo;
7
8
8
use Koha::Database;
9
use Koha::Database;
(-)a/t/db_dependent/selenium/00-onboarding.t (-1 / +2 lines)
Lines 22-28 Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
24
25
use Test::More tests => 2;
25
use Test::More tests => 3;
26
use Test::NoWarnings;
26
27
27
use t::lib::Selenium;
28
use t::lib::Selenium;
28
use C4::Context;
29
use C4::Context;
(-)a/t/db_dependent/selenium/01-installation.t (-1 / +2 lines)
Lines 22-28 Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
24
25
use Test::More tests => 2;
25
use Test::More tests => 3;
26
use Test::NoWarnings;
26
27
27
use t::lib::Selenium;
28
use t::lib::Selenium;
28
use C4::Context;
29
use C4::Context;
(-)a/t/db_dependent/selenium/opac_ill_requests.t (-1 / +2 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use Test::More tests => 1;
19
use Test::More tests => 2;
20
use Test::NoWarnings;
20
21
21
use C4::Biblio qw(DelBiblio);
22
use C4::Biblio qw(DelBiblio);
22
23
(-)a/xt/use-test-no-warnings.t (-1 / +54 lines)
Line 0 Link Here
0
- 
1
#/usr/bin/perl
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 3 of the License, or
8
# (at your option) any later version.
9
#
10
# Koha is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
18
use Modern::Perl;
19
use Test::More tests => 2;
20
use Test::NoWarnings;
21
22
use Array::Utils qw( array_minus );
23
24
my @t_files = qx{git grep --files-without-match "Test::NoWarnings" 't/*.t'};
25
chomp for @t_files;
26
27
my @exceptions = (
28
29
    # Cannot be removed
30
    "t/00-testcritic.t",
31
32
    # bug 40386
33
    "t/Edifact.t",
34
35
    # bug 40387
36
    "t/db_dependent/Koha/EDI.t",
37
38
    # bug 40382
39
    "t/db_dependent/Koha/CoverImages.t",
40
41
    # bug 40442
42
    "t/db_dependent/Koha/MarcOrder.t",
43
44
    # bug 40375
45
    "t/db_dependent/XISBN.t",
46
47
    # bug 40443
48
    "t/db_dependent/cronjobs/advance_notices_digest.t",
49
);
50
51
@t_files = array_minus( @t_files, @exceptions );
52
is( scalar(@t_files), 0, "All Perl test files should contain Test::NoWarnings" )
53
    or diag( sprintf "The following test files should use Test::NoWarnings:\n\t%s", join "\n\t", @t_files );
54

Return to bug 40444