|
Lines 16-48
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; |
19 |
use Test::More tests => 1; |
| 20 |
|
20 |
|
| 21 |
use File::Temp; |
21 |
use File::Temp; |
| 22 |
use File::Path qw/make_path/; |
22 |
use File::Path qw/make_path/; |
| 23 |
|
23 |
|
| 24 |
use t::lib::Mocks; |
24 |
use t::lib::Mocks; |
| 25 |
|
25 |
|
| 26 |
use Module::Load::Conditional qw/check_install/; |
26 |
use C4::XSLT; |
| 27 |
|
|
|
| 28 |
BEGIN { |
| 29 |
if ( check_install( module => 'Test::DBIx::Class' ) ) { |
| 30 |
plan tests => 9; |
| 31 |
} else { |
| 32 |
plan skip_all => "Need Test::DBIx::Class" |
| 33 |
} |
| 34 |
|
| 35 |
use_ok('C4::XSLT'); |
| 36 |
}; |
| 37 |
|
| 38 |
use Test::DBIx::Class; |
| 39 |
my $db = Test::MockModule->new('Koha::Database'); |
| 40 |
$db->mock( _new_schema => sub { return Schema(); } ); |
| 41 |
|
27 |
|
| 42 |
my $dir = File::Temp->newdir(); |
28 |
my $dir = File::Temp->newdir(); |
| 43 |
my @themes = ('prog', 'test'); |
29 |
my @themes = ('prog', 'test'); |
| 44 |
my @langs = ('en', 'es-ES'); |
30 |
my @langs = ('en', 'es-ES'); |
| 45 |
|
31 |
|
|
|
32 |
subtest 'Tests moved from t' => sub { |
| 33 |
plan tests => 8; |
| 34 |
|
| 46 |
# create temporary files to be tested later |
35 |
# create temporary files to be tested later |
| 47 |
foreach my $theme (@themes) { |
36 |
foreach my $theme (@themes) { |
| 48 |
foreach my $lang (@langs) { |
37 |
foreach my $lang (@langs) { |
|
Lines 76-79
is(find_and_slurp($dir, 'nope', 'fr-FR'), 'Theme prog, language en', 'Fell ba
Link Here
|
| 76 |
my $matching_string = q{<syspref name="singleBranchMode">0</syspref>}; |
65 |
my $matching_string = q{<syspref name="singleBranchMode">0</syspref>}; |
| 77 |
my $sysprefs_xml = C4::XSLT::get_xslt_sysprefs(); |
66 |
my $sysprefs_xml = C4::XSLT::get_xslt_sysprefs(); |
| 78 |
ok( $sysprefs_xml =~ m/$matching_string/, 'singleBranchMode has a value of 0'); |
67 |
ok( $sysprefs_xml =~ m/$matching_string/, 'singleBranchMode has a value of 0'); |
| 79 |
|
68 |
}; |
| 80 |
- |
|
|