|
Line 0
Link Here
|
| 0 |
- |
1 |
use Modern::Perl; |
|
|
2 |
use Test::More tests => 1; |
| 3 |
use MARC::Record; |
| 4 |
|
| 5 |
use t::lib::Mocks; |
| 6 |
use C4::Biblio; |
| 7 |
|
| 8 |
t::lib::Mocks::mock_preference('marcflavour', 'MARC21'); |
| 9 |
|
| 10 |
my $record = C4::Biblio::TransformKohaToMarc({ |
| 11 |
"biblioitems.illus" => "Other physical details", # 300$b |
| 12 |
"biblioitems.pages" => "Extent", # 300$a |
| 13 |
"biblioitems.size" => "Dimensions", # 300$c |
| 14 |
}); |
| 15 |
|
| 16 |
my @subfields = $record->field('300')->subfields(); |
| 17 |
is_deeply( \@subfields, [ |
| 18 |
[ |
| 19 |
'a', |
| 20 |
'Extent' |
| 21 |
], |
| 22 |
[ |
| 23 |
'b', |
| 24 |
'Other physical details' |
| 25 |
], |
| 26 |
[ |
| 27 |
'c', |
| 28 |
'Dimensions' |
| 29 |
] |
| 30 |
], |
| 31 |
'TransformKohaToMarc should returns sorted subfields (regression test for bug 12343)' ); |