PATH:
opt
/
alt
/
php73
/
usr
/
share
/
pear
/
test
/
File_MARC
/
tests
--TEST-- marc_lint_002: Tests check041() and check043() called separately --SKIPIF-- <?php include('tests/skipif.inc'); ?> <?php include('tests/skipif_noispn.inc'); ?> --FILE-- <?php $dir = dirname(__FILE__); require __DIR__ . '/bootstrap.php'; // Create test harness to allow direct calls to check methods: class File_MARC_Lint_Test_Harness extends File_MARC_Lint { public function check041($field) { return parent::check041($field); } public function check043($field) { return parent::check043($field); } // override warn method to echo instead of store in object: protected function warn($msg) { echo $msg . "\n"; } } $marc_lint = new File_MARC_Lint_Test_Harness(); $field = new File_MARC_Data_Field( '041', array( new File_MARC_Subfield('a', 'end'), // invalid new File_MARC_Subfield('a', 'span'), // too long new File_MARC_Subfield('h', 'far') // obsolete ), "0", "" ); $marc_lint->check041($field); $field = new File_MARC_Data_Field( '041', array( new File_MARC_Subfield('a', 'endorviwo'), // invalid new File_MARC_Subfield('a', 'spanowpalasba') // too long and invalid ), "1", "" ); $marc_lint->check041($field); $field = new File_MARC_Data_Field( '043', array( new File_MARC_Subfield('a', 'n-----'), // 6 chars vs. 7 new File_MARC_Subfield('a', 'n-us----'), // 8 chars vs. 7 new File_MARC_Subfield('a', 'n-ma-us'), // invalid code new File_MARC_Subfield('a', 'e-ur-ai') // obsolete code ), "", "" ); $marc_lint->check043($field); ?> --EXPECT-- 041: Subfield _a, end (end), is not valid. 041: Subfield _a must be evenly divisible by 3 or exactly three characters if ind2 is not 7, (span). 041: Subfield _h, far, may be obsolete. 041: Subfield _a, endorviwo (end), is not valid. 041: Subfield _a, endorviwo (orv), is not valid. 041: Subfield _a, endorviwo (iwo), is not valid. 041: Subfield _a must be evenly divisible by 3 or exactly three characters if ind2 is not 7, (spanowpalasba). 043: Subfield _a must be exactly 7 characters, n----- 043: Subfield _a must be exactly 7 characters, n-us---- 043: Subfield _a, n-ma-us, is not valid. 043: Subfield _a, e-ur-ai, may be obsolete.
[-] marc_lint_005.phpt
[open]
[-] bad_example.xml
[open]
[-] skipif.inc
[open]
[-] marc_field_003.phpt
[open]
[-] marc_014.phpt
[open]
[-] music.xml
[open]
[+]
..
[-] example.mrc
[open]
[-] marc_016.phpt
[open]
[-] marc_xml_007.phpt
[open]
[-] marc_field_004.phpt
[open]
[-] marc_lint_001.phpt
[open]
[-] marc_004.phpt
[open]
[-] sandburg.mrc
[open]
[-] marc_002.phpt
[open]
[-] marc_field_002.phpt
[open]
[-] marc_subfield_001.phpt
[open]
[-] marc_009.phpt
[open]
[-] onerecord.xml
[open]
[-] marc_xml_namespace_prefix.phpt
[open]
[-] marc_xml_009.phpt
[open]
[-] marc_023.phpt
[open]
[-] marc_lint_004.phpt
[open]
[-] bigarchive.xml
[open]
[-] marc_015.phpt
[open]
[-] marc_021.phpt
[open]
[-] marc_020.phpt
[open]
[-] marc_xml_16642.phpt
[open]
[-] marc_xml_008.phpt
[open]
[-] marc_xml_002.phpt
[open]
[-] marc_subfield_002.phpt
[open]
[-] marc_003.phpt
[open]
[-] sandburg.xml
[open]
[-] marc_018.phpt
[open]
[-] namespace.xml
[open]
[-] music.mrc
[open]
[-] marc_lint_002.phpt
[open]
[-] marc_xml_namespace.phpt
[open]
[-] marc_010.phpt
[open]
[-] marc_006.phpt
[open]
[-] marc_xml_006.phpt
[open]
[-] marc_017.phpt
[open]
[-] marc_lint_003.phpt
[open]
[-] marc_field_001.phpt
[open]
[-] marc_xml_rsinger.phpt
[open]
[-] marc_008.phpt
[open]
[-] marc_007.phpt
[open]
[-] marc_xml_005.phpt
[open]
[-] marc_012.phpt
[open]
[-] marc_16783.phpt
[open]
[-] bad_example.mrc
[open]
[-] marc_field_21246.phpt
[open]
[-] marc_022.phpt
[open]
[-] marc_005.phpt
[open]
[-] marc_field_005.phpt
[open]
[-] marc_xml_001.phpt
[open]
[-] marc_xml_003.phpt
[open]
[-] marc_record_001.phpt
[open]
[-] marc_001.phpt
[open]
[-] marc_019.phpt
[open]
[-] marc_xml_004.phpt
[open]
[-] marc_013.phpt
[open]
[-] xmlescape.mrc
[open]
[-] camel.mrc
[open]
[-] marc_011.phpt
[open]