Lines 1-20
Link Here
|
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; |
1 |
use Modern::Perl; |
19 |
|
2 |
|
20 |
use MARC::Record; |
3 |
use MARC::Record; |
Lines 26-40
use t::lib::Mocks;
Link Here
|
26 |
use Koha::Database; |
9 |
use Koha::Database; |
27 |
use Koha::Libraries; |
10 |
use Koha::Libraries; |
28 |
use Koha::ItemTypes; |
11 |
use Koha::ItemTypes; |
|
|
12 |
use C4::XSLT; |
29 |
|
13 |
|
30 |
BEGIN { |
14 |
BEGIN { |
31 |
use_ok('C4::XSLT', qw( buildKohaItemsNamespace )); |
15 |
use_ok('C4::XSLT', qw( buildKohaItemsNamespace )); |
32 |
} |
16 |
} |
33 |
|
17 |
|
34 |
my $schema = Koha::Database->new->schema; |
18 |
our $schema = Koha::Database->new->schema; |
35 |
my $builder = t::lib::TestBuilder->new; |
|
|
36 |
|
19 |
|
|
|
20 |
# Here we go |
37 |
$schema->storage->txn_begin; |
21 |
$schema->storage->txn_begin; |
|
|
22 |
subtest 'CustomXSLTExportList: Check export options' => sub { |
23 |
plan tests => 2; |
24 |
t::lib::Mocks::mock_preference('OpacExportOptions', 'custom'); |
25 |
my $list = C4::XSLT::CustomXSLTExportList(1); |
26 |
is( @$list>0, 1, 'We expect at least one result: simple export' ); |
27 |
t::lib::Mocks::mock_preference('OpacExportOptions', 'dc'); |
28 |
$list = C4::XSLT::CustomXSLTExportList(1); |
29 |
is( @$list, 0, 'We expect an empty list now' ); |
30 |
}; |
38 |
|
31 |
|
39 |
subtest 'buildKohaItemsNamespace status tests' => sub { |
32 |
subtest 'buildKohaItemsNamespace status tests' => sub { |
40 |
plan tests => 17; |
33 |
plan tests => 17; |
41 |
- |
|
|