X7ROOT File Manager
Current Path:
/opt/alt/tests/alt-php80-pecl-dbase_7.1.1-1.el8/tests
opt
/
alt
/
tests
/
alt-php80-pecl-dbase_7.1.1-1.el8
/
tests
/
??
..
??
001.phpt
(1.15 KB)
??
002.phpt
(1.22 KB)
??
bug31754.phpt
(568 B)
??
bug39305.phpt
(1.03 KB)
??
bug52112.phpt
(1.39 KB)
??
bug73391.phpt
(531 B)
??
bug73395.phpt
(480 B)
??
bug73411.phpt
(705 B)
??
bug73414.dbf
(98 B)
??
bug73414.phpt
(441 B)
??
bug73442.phpt
(641 B)
??
bug73447.phpt
(785 B)
??
bug78070.phpt
(954 B)
??
bug78668.dbf
(20 B)
??
bug78668.phpt
(546 B)
??
bug78668_8.phpt
(604 B)
??
bug80156.phpt
(640 B)
??
bug81563.dbf
(159 B)
??
bug81563.phpt
(578 B)
??
dbase_add_record_basic.phpt
(1020 B)
??
dbase_add_record_error-8.phpt
(1.43 KB)
??
dbase_add_record_error.phpt
(1.35 KB)
??
dbase_add_record_variation1.phpt
(1.32 KB)
??
dbase_add_record_variation2.phpt
(1.54 KB)
??
dbase_add_record_variation3.phpt
(901 B)
??
dbase_add_record_variation4.phpt
(598 B)
??
dbase_close_error.phpt
(577 B)
??
dbase_close_error_8.phpt
(664 B)
??
dbase_create_basic.phpt
(1.88 KB)
??
dbase_create_error.phpt
(4.66 KB)
??
dbase_create_error_8.phpt
(4.75 KB)
??
dbase_create_error_open_basedir.phpt
(405 B)
??
dbase_create_variation1.phpt
(756 B)
??
dbase_create_variation2.phpt
(555 B)
??
dbase_create_variation3.phpt
(777 B)
??
dbase_delete_record_basic.phpt
(954 B)
??
dbase_delete_record_error_32bit.phpt
(1.32 KB)
??
dbase_delete_record_error_32bit_8.phpt
(1.53 KB)
??
dbase_delete_record_error_64bit.phpt
(1.35 KB)
??
dbase_delete_record_error_64bit_8.phpt
(1.55 KB)
??
dbase_delete_record_variation1.phpt
(844 B)
??
dbase_get_header_info_basic.phpt
(2.18 KB)
??
dbase_get_header_info_error.phpt
(652 B)
??
dbase_get_header_info_error_8.phpt
(746 B)
??
dbase_get_record_basic.phpt
(852 B)
??
dbase_get_record_error_32bit.phpt
(1.29 KB)
??
dbase_get_record_error_32bit_8.phpt
(1.49 KB)
??
dbase_get_record_error_64bit.phpt
(1.32 KB)
??
dbase_get_record_error_64bit_8.phpt
(1.51 KB)
??
dbase_get_record_with_names_basic.phpt
(952 B)
??
dbase_get_record_with_names_error_32bit.phpt
(1.43 KB)
??
dbase_get_record_with_names_error_32bit_8.phpt
(1.63 KB)
??
dbase_get_record_with_names_error_64bit.phpt
(1.46 KB)
??
dbase_get_record_with_names_error_64bit_8.phpt
(1.65 KB)
??
dbase_get_record_with_names_variation1.phpt
(797 B)
??
dbase_numfields_basic.phpt
(609 B)
??
dbase_numfields_error.phpt
(597 B)
??
dbase_numfields_error_8.phpt
(684 B)
??
dbase_numrecords_basic.phpt
(613 B)
??
dbase_numrecords_error.phpt
(602 B)
??
dbase_numrecords_error_8.phpt
(689 B)
??
dbase_open_error.phpt
(381 B)
??
dbase_open_error1.dbf
(98 B)
??
dbase_open_error1.phpt
(466 B)
??
dbase_open_error2.dbf
(98 B)
??
dbase_open_error2.phpt
(486 B)
??
dbase_open_error3.dbf
(98 B)
??
dbase_open_error3.phpt
(492 B)
??
dbase_open_error_8.phpt
(433 B)
??
dbase_open_error_open_basedir.phpt
(421 B)
??
dbase_pack_basic.phpt
(963 B)
??
dbase_pack_error.phpt
(572 B)
??
dbase_pack_error_8.phpt
(659 B)
??
dbase_pack_variation1.phpt
(805 B)
??
dbase_pack_variation2.phpt
(637 B)
??
dbase_replace_record_basic.phpt
(1.01 KB)
??
dbase_replace_record_error.phpt
(1.41 KB)
??
dbase_replace_record_error_1_32bit.phpt
(1.28 KB)
??
dbase_replace_record_error_1_32bit_8.phpt
(1.39 KB)
??
dbase_replace_record_error_1_64bit.phpt
(1.31 KB)
??
dbase_replace_record_error_1_64bit_8.phpt
(1.42 KB)
??
dbase_replace_record_error_8.phpt
(1.5 KB)
??
dbase_replace_record_variation1.phpt
(1.36 KB)
??
dbase_replace_record_variation2.phpt
(1.59 KB)
??
dbase_replace_record_variation3.phpt
(920 B)
??
example.dbf
(450 B)
??
gh-1.phpt
(462 B)
??
nullable.phpt
(1.97 KB)
??
type_datetime.phpt
(1.95 KB)
??
type_logical.phpt
(894 B)
??
type_numeric_int_32bit.phpt
(1.46 KB)
??
type_numeric_int_64bit.phpt
(1.36 KB)
Editing: dbase_create_error.phpt
--TEST-- dbase_create() - error conditions --SKIPIF-- <?php if (!extension_loaded('dbase')) die('skip dbase extension not available'); if (version_compare(PHP_VERSION, '8', '>')) die('skip for PHP 7 only'); ?> --FILE-- <?php define('FILENAME', __DIR__ . DIRECTORY_SEPARATOR . 'dbase_create_error.dbf'); /* too few arguments */ var_dump(dbase_create(FILENAME)); if (file_exists(FILENAME)) unlink(FILENAME); /* too many arguments */ var_dump(dbase_create(FILENAME, array(), DBASE_TYPE_DBASE, 'additional argument')); if (file_exists(FILENAME)) unlink(FILENAME); /* second argument is no array */ try { dbase_create(FILENAME, 'no array'); } catch (TypeError $ex) { echo $ex->getMessage(), PHP_EOL; } if (file_exists(FILENAME)) unlink(FILENAME); /* no fields */ var_dump(dbase_create(FILENAME, array())); if (file_exists(FILENAME)) unlink(FILENAME); /* associative array */ var_dump(dbase_create(FILENAME, array('foo' => 'bar'))); if (file_exists(FILENAME)) unlink(FILENAME); /* field without name */ var_dump(dbase_create(FILENAME, array(array()))); if (file_exists(FILENAME)) unlink(FILENAME); /* field with empty name */ var_dump(dbase_create(FILENAME, array(array('')))); if (file_exists(FILENAME)) unlink(FILENAME); /* field name too long */ var_dump(dbase_create(FILENAME, array(array('abcdefghijk')))); if (file_exists(FILENAME)) unlink(FILENAME); /* field type missing */ var_dump(dbase_create(FILENAME, array(array('foo')))); if (file_exists(FILENAME)) unlink(FILENAME); /* field length missing */ var_dump(dbase_create(FILENAME, array(array('foo', 'C')))); if (file_exists(FILENAME)) unlink(FILENAME); /* field length too small */ var_dump(dbase_create(FILENAME, array(array('foo', 'C', -1)))); if (file_exists(FILENAME)) unlink(FILENAME); /* field length too large */ var_dump(dbase_create(FILENAME, array(array('foo', 'C', 255)))); if (file_exists(FILENAME)) unlink(FILENAME); /* field precision missing */ var_dump(dbase_create(FILENAME, array(array('foo', 'N', 10)))); if (file_exists(FILENAME)) unlink(FILENAME); /* field precision too small */ var_dump(dbase_create(FILENAME, array(array('foo', 'N', 10, -1)))); if (file_exists(FILENAME)) unlink(FILENAME); /* field precision too large */ var_dump(dbase_create(FILENAME, array(array('foo', 'N', 10, 255)))); if (file_exists(FILENAME)) unlink(FILENAME); /* unknown field type */ var_dump(dbase_create(FILENAME, array(array('foo', '~')))); if (file_exists(FILENAME)) unlink(FILENAME); /* unsupported field type*/ var_dump(dbase_create(FILENAME, array(array('foo', 'T')))); if (file_exists(FILENAME)) unlink(FILENAME); /* unknown database type */ var_dump(dbase_create(FILENAME, array(array('foo', 'C', 15)), 17)); if (file_exists(FILENAME)) unlink(FILENAME); ?> ===DONE=== --EXPECTF-- Warning: dbase_create() expects at least 2 parameters, 1 given in %s on line %d NULL Warning: dbase_create() expects at most 3 parameters, 4 given in %s on line %d NULL Argument 2 passed to dbase_create() must be of the type array, string given Warning: dbase_create(): Unable to create database without fields in %s on line %d bool(false) Warning: dbase_create(): expected plain indexed array in %s on line %d bool(false) Warning: dbase_create(): expected field name as element 0 of list in field 0 in %s on line %d bool(false) Warning: dbase_create(): invalid field name '' (must be non-empty and less than or equal to 10 characters) in %s on line %d bool(false) Warning: dbase_create(): invalid field name 'abcdefghijk' (must be non-empty and less than or equal to 10 characters) in %s on line %d bool(false) Warning: dbase_create(): expected field type as element 1 of list in field 0 in %s on line %d bool(false) Warning: dbase_create(): expected field length as element 2 of list in field 0 in %s on line %d bool(false) Warning: dbase_create(): expected length of field 0 to be in range 0..254, but got -1 in %s on line %d bool(false) Warning: dbase_create(): expected length of field 0 to be in range 0..254, but got 255 in %s on line %d bool(false) Warning: dbase_create(): expected field precision as element 3 of list in field 0 in %s on line %d bool(false) Warning: dbase_create(): expected precision of field 0 to be in range 0..254, but got -1 in %s on line %d bool(false) Warning: dbase_create(): expected precision of field 0 to be in range 0..254, but got 255 in %s on line %d bool(false) Warning: dbase_create(): unknown field type '~' in %s on line %d bool(false) Warning: dbase_create(): datetime fields are not supported by dBASE in %s on line %d bool(false) Warning: dbase_create(): unknown database type 17 in %s on line %d bool(false) ===DONE=== --CLEAN-- <?php define('FILENAME', __DIR__ . DIRECTORY_SEPARATOR . 'dbase_create_error.dbf'); unlink(FILENAME); ?>
Upload File
Create Folder