1--TEST--
2marc_xml_16642: Fix bug 16642: ensure tag and subfield values are returned as strings
3--SKIPIF--
4<?php include('tests/skipif.inc'); ?>
5--FILE--
6<?php
7$dir = dirname(__FILE__);
8require __DIR__ . '/bootstrap.php';
9// Retrieve a set of MARC records from a file
10$marc_file = new File_MARCXML($dir . '/' . 'onerecord.xml');
11// Iterate through the retrieved records
12while ($record = $marc_file->next()) {
13   foreach ($record->getFields() as $tag => $subfields) {
14       // Skip everything except for 650 fields
15       if ($tag == '650') {
16           print "Subject:";
17           foreach ($subfields->getSubfields() as $code => $value) {
18               print " $value";
19           }
20           print "\n";
21       }
22   }
23}
24?>
25--EXPECT--
26Subject: [a]: Arithmetic [x]: Juvenile poetry.
27Subject: [a]: Children's poetry, American.
28Subject: [a]: Arithmetic [x]: Poetry.
29Subject: [a]: American poetry.
30Subject: [a]: Visual perception.
31