PATH:
opt
/
alt
/
tests
/
alt-php82-pecl-dbase_7.1.1-1.el8
/
tests
--TEST-- Nullable fields --SKIPIF-- <?php if (!extension_loaded('dbase')) die('skip dbase extension not available'); ?> --FILE-- <?php $filename = __DIR__ . DIRECTORY_SEPARATOR . 'nullable.dbf'; $spec = array( ['A', 'C', 15], ['B', 'C', 15, true], ['C', 'C', 15, true], ['D', 'N', 15, 0], ['E', 'N', 15, 0, true], ['F', 'N', 15, 0, true], ['G', 'L'], ['H', 'L', true], ['I', 'L', true], ['J', 'D'], ['K', 'D', true], ['L', 'D', true], ['M', 'F', 15, 2], ['N', 'F', 15, 2, true], ['O', 'F', 15, 2, true], ); $db = dbase_create($filename, $spec, DBASE_TYPE_FOXPRO); dbase_add_record($db, [ null, null, 'foo', null, null, 42, null, null, 'T', null, null, '20161105', null, null, 3.14 ]); var_dump( dbase_numfields($db), count(dbase_get_header_info($db)) ); var_dump(dbase_get_record($db, 1)); dbase_close($db); $db = dbase_open($filename, DBASE_RDONLY); var_dump(dbase_get_record_with_names($db, 1)); ?> ===DONE=== --EXPECT-- int(15) int(15) array(16) { [0]=> string(15) " " [1]=> NULL [2]=> string(15) "foo " [3]=> int(0) [4]=> NULL [5]=> int(42) [6]=> bool(false) [7]=> NULL [8]=> bool(true) [9]=> string(8) " " [10]=> NULL [11]=> string(8) "20161105" [12]=> float(0) [13]=> NULL [14]=> float(3.14) ["deleted"]=> int(0) } array(16) { ["A"]=> string(15) " " ["B"]=> NULL ["C"]=> string(15) "foo " ["D"]=> int(0) ["E"]=> NULL ["F"]=> int(42) ["G"]=> bool(false) ["H"]=> NULL ["I"]=> bool(true) ["J"]=> string(8) " " ["K"]=> NULL ["L"]=> string(8) "20161105" ["M"]=> float(0) ["N"]=> NULL ["O"]=> float(3.14) ["deleted"]=> int(0) } ===DONE=== --CLEAN-- <?php unlink(__DIR__ . DIRECTORY_SEPARATOR . 'nullable.dbf'); ?>
[+]
..
[-] dbase_create_variation1.phpt
[edit]
[-] dbase_pack_basic.phpt
[edit]
[-] dbase_get_record_with_names_basic.phpt
[edit]
[-] dbase_numrecords_error_8.phpt
[edit]
[-] bug73442.phpt
[edit]
[-] dbase_numrecords_basic.phpt
[edit]
[-] bug73395.phpt
[edit]
[-] bug78668.dbf
[edit]
[-] type_logical.phpt
[edit]
[-] bug78668.phpt
[edit]
[-] dbase_create_error.phpt
[edit]
[-] bug73391.phpt
[edit]
[-] dbase_replace_record_error_8.phpt
[edit]
[-] dbase_open_error_8.phpt
[edit]
[-] dbase_close_error.phpt
[edit]
[-] 001.phpt
[edit]
[-] dbase_get_header_info_error_8.phpt
[edit]
[-] dbase_delete_record_error_64bit.phpt
[edit]
[-] dbase_get_record_basic.phpt
[edit]
[-] bug81563.phpt
[edit]
[-] dbase_open_error_open_basedir.phpt
[edit]
[-] dbase_get_record_error_32bit.phpt
[edit]
[-] dbase_delete_record_variation1.phpt
[edit]
[-] dbase_get_record_error_64bit_8.phpt
[edit]
[-] dbase_get_header_info_basic.phpt
[edit]
[-] dbase_get_header_info_error.phpt
[edit]
[-] bug31754.phpt
[edit]
[-] dbase_delete_record_error_32bit.phpt
[edit]
[-] bug81563.dbf
[edit]
[-] dbase_replace_record_error_1_32bit_8.phpt
[edit]
[-] dbase_open_error1.dbf
[edit]
[-] dbase_replace_record_error.phpt
[edit]
[-] dbase_open_error1.phpt
[edit]
[-] dbase_open_error2.dbf
[edit]
[-] dbase_pack_error.phpt
[edit]
[-] dbase_close_error_8.phpt
[edit]
[-] dbase_add_record_variation3.phpt
[edit]
[-] dbase_create_variation3.phpt
[edit]
[-] dbase_add_record_basic.phpt
[edit]
[-] dbase_add_record_variation4.phpt
[edit]
[-] dbase_create_error_open_basedir.phpt
[edit]
[-] dbase_create_variation2.phpt
[edit]
[-] dbase_create_error_8.phpt
[edit]
[-] dbase_replace_record_error_1_64bit.phpt
[edit]
[-] dbase_delete_record_error_64bit_8.phpt
[edit]
[-] dbase_add_record_variation2.phpt
[edit]
[-] dbase_pack_variation1.phpt
[edit]
[-] dbase_numrecords_error.phpt
[edit]
[-] dbase_replace_record_variation1.phpt
[edit]
[-] dbase_get_record_error_64bit.phpt
[edit]
[-] example.dbf
[edit]
[-] dbase_get_record_with_names_error_64bit.phpt
[edit]
[-] type_datetime.phpt
[edit]
[-] dbase_replace_record_error_1_32bit.phpt
[edit]
[-] dbase_delete_record_basic.phpt
[edit]
[-] dbase_pack_variation2.phpt
[edit]
[-] bug39305.phpt
[edit]
[-] dbase_add_record_error-8.phpt
[edit]
[-] 002.phpt
[edit]
[-] dbase_pack_error_8.phpt
[edit]
[-] dbase_replace_record_variation3.phpt
[edit]
[-] dbase_open_error2.phpt
[edit]
[-] dbase_replace_record_error_1_64bit_8.phpt
[edit]
[-] bug80156.phpt
[edit]
[-] dbase_get_record_with_names_error_64bit_8.phpt
[edit]
[-] dbase_add_record_variation1.phpt
[edit]
[-] bug73447.phpt
[edit]
[-] dbase_numfields_error.phpt
[edit]
[-] dbase_open_error.phpt
[edit]
[-] type_numeric_int_64bit.phpt
[edit]
[-] dbase_get_record_with_names_variation1.phpt
[edit]
[-] bug78668_8.phpt
[edit]
[-] bug78070.phpt
[edit]
[-] dbase_replace_record_variation2.phpt
[edit]
[-] dbase_open_error3.phpt
[edit]
[-] type_numeric_int_32bit.phpt
[edit]
[-] bug73414.phpt
[edit]
[-] bug52112.phpt
[edit]
[-] dbase_numfields_error_8.phpt
[edit]
[-] dbase_add_record_error.phpt
[edit]
[-] dbase_delete_record_error_32bit_8.phpt
[edit]
[-] dbase_get_record_with_names_error_32bit.phpt
[edit]
[-] dbase_create_basic.phpt
[edit]
[-] dbase_replace_record_basic.phpt
[edit]
[-] dbase_get_record_error_32bit_8.phpt
[edit]
[-] bug73414.dbf
[edit]
[-] dbase_numfields_basic.phpt
[edit]
[-] bug73411.phpt
[edit]
[-] gh-1.phpt
[edit]
[-] nullable.phpt
[edit]
[-] dbase_get_record_with_names_error_32bit_8.phpt
[edit]
[-] dbase_open_error3.dbf
[edit]