Lines 66-72
my $some_marc_xml = q{<?xml version="1.0" encoding="UTF-8"?>
Link Here
|
66 |
<subfield code="y">value for y</subfield> |
66 |
<subfield code="y">value for y</subfield> |
67 |
<subfield code="é">value for é 1</subfield> |
67 |
<subfield code="é">value for é 1</subfield> |
68 |
<subfield code="é">value for é 2</subfield> |
68 |
<subfield code="é">value for é 2</subfield> |
69 |
<subfield code="z">value for z 1|value for z 2</subfield> |
69 |
<subfield code="z">value for z 1 | value for z 2</subfield> |
70 |
</datafield> |
70 |
</datafield> |
71 |
</record> |
71 |
</record> |
72 |
|
72 |
|
Lines 76-94
$item->more_subfields_xml($some_marc_xml)->store;
Link Here
|
76 |
|
76 |
|
77 |
$attributes = $item->additional_attributes; |
77 |
$attributes = $item->additional_attributes; |
78 |
is( ref($attributes), 'Koha::Item::Attributes' ); |
78 |
is( ref($attributes), 'Koha::Item::Attributes' ); |
79 |
is( $attributes->{'x'}, "value for x 1|value for x 2"); |
79 |
is( $attributes->{'x'}, "value for x 1 | value for x 2"); |
80 |
is( $attributes->{'y'}, "value for y"); |
80 |
is( $attributes->{'y'}, "value for y"); |
81 |
is( $attributes->{'é'}, "value for é 1|value for é 2"); |
81 |
is( $attributes->{'é'}, "value for é 1 | value for é 2"); |
82 |
is( $attributes->{'z'}, "value for z 1|value for z 2"); |
82 |
is( $attributes->{'z'}, "value for z 1 | value for z 2"); |
83 |
|
83 |
|
84 |
is( $attributes->to_marcxml, $some_marc_xml ); |
84 |
is( $attributes->to_marcxml, $some_marc_xml ); |
85 |
is_deeply( |
85 |
is_deeply( |
86 |
$attributes->to_hashref, |
86 |
$attributes->to_hashref, |
87 |
{ |
87 |
{ |
88 |
'x' => "value for x 1|value for x 2", |
88 |
'x' => "value for x 1 | value for x 2", |
89 |
'y' => "value for y", |
89 |
'y' => "value for y", |
90 |
'é' => "value for é 1|value for é 2", |
90 |
'é' => "value for é 1 | value for é 2", |
91 |
'z' => "value for z 1|value for z 2", |
91 |
'z' => "value for z 1 | value for z 2", |
92 |
} |
92 |
} |
93 |
); |
93 |
); |
94 |
|
94 |
|
95 |
- |
|
|