|
Lines 1-7
Link Here
|
| 1 |
#!/usr/bin/perl |
1 |
#!/usr/bin/perl |
| 2 |
|
2 |
|
| 3 |
# This file is part of Koha. |
3 |
# This file is part of Koha. |
| 4 |
my $verbose = 0; |
|
|
| 5 |
|
4 |
|
| 6 |
use Modern::Perl; |
5 |
use Modern::Perl; |
| 7 |
|
6 |
|
|
Lines 10-21
use Test::MockModule;
Link Here
|
| 10 |
|
9 |
|
| 11 |
use Koha::Libraries; |
10 |
use Koha::Libraries; |
| 12 |
use C4::Context; |
11 |
use C4::Context; |
|
|
12 |
|
| 13 |
Koha::Libraries->search->count; |
13 |
Koha::Libraries->search->count; |
| 14 |
|
14 |
|
|
|
15 |
my $verbose = 0; |
| 15 |
|
16 |
|
| 16 |
|
17 |
|
| 17 |
subtest "Scenario: Show how caching prevents Test::DBIx::Class from working properly and how to circumvent it", sub { |
18 |
subtest "Scenario: Show how caching prevents Test::DBIx::Class from working properly and how to circumvent it", sub { |
| 18 |
my ($firstSchema, $schema, $cachedSchema, $cachedSchema2, $firstLibCount, $libCount); |
19 |
my ($firstSchema, $cachedSchema, $cachedSchema2, $firstLibCount, $libCount); |
| 19 |
|
20 |
|
| 20 |
eval { |
21 |
eval { |
| 21 |
|
22 |
|
|
Lines 74-86
subtest "Scenario: Show how caching prevents Test::DBIx::Class from working prop
Link Here
|
| 74 |
' And the cached DB connection type is sqlite'); |
75 |
' And the cached DB connection type is sqlite'); |
| 75 |
|
76 |
|
| 76 |
|
77 |
|
| 77 |
eval "fixtures_ok [ #Dynamically load fixtures, because we dynamically load T:D:C. Otherwise there be compile errors! |
78 |
fixtures_ok( [ #Dynamically load fixtures, because we dynamically load T:D:C. Otherwise there be compile errors! |
| 78 |
Branch => [ |
79 |
Branch => [ |
| 79 |
['branchcode', 'branchname'], |
80 |
['branchcode', 'branchname'], |
| 80 |
['XXX_test', 'my branchname XXX'], |
81 |
['XXX_test', 'my branchname XXX'], |
| 81 |
] |
82 |
] |
| 82 |
], |
83 |
], |
| 83 |
'Step: Given we deploy T:D:C Fixtures';"; |
84 |
'Step: Given we deploy T:D:C Fixtures'); |
| 84 |
|
85 |
|
| 85 |
ok($libCount = Koha::Libraries->search->count, |
86 |
ok($libCount = Koha::Libraries->search->count, |
| 86 |
' When the libraries are counted'); |
87 |
' When the libraries are counted'); |
| 87 |
- |
|
|