diff options
Diffstat (limited to 'ext/dbase/tests')
-rw-r--r-- | ext/dbase/tests/001.phpt | 61 | ||||
-rw-r--r-- | ext/dbase/tests/002.phpt | 54 | ||||
-rw-r--r-- | ext/dbase/tests/bug31754.phpt | 26 |
3 files changed, 0 insertions, 141 deletions
diff --git a/ext/dbase/tests/001.phpt b/ext/dbase/tests/001.phpt deleted file mode 100644 index 51a4488708..0000000000 --- a/ext/dbase/tests/001.phpt +++ /dev/null @@ -1,61 +0,0 @@ ---TEST-- -dbase_create() tests ---SKIPIF-- -<?php if (!extension_loaded("dbase")) print "skip"; ?> ---FILE-- -<?php - -$fields_arr = Array( - Array( - array('date','D'), - ), - Array( - array('error', 'E'), - ), - Array( - array('error', -1), - ), - Array( - array(-1, 'N', 3, 0), - ), - Array( - array(), - ), - Array( - ), -); - -$file = dirname(__FILE__).'/001.dbf'; - -foreach ($fields_arr as $fields) { - var_dump(dbase_create($file, $fields)); - @unlink($file); -} - -var_dump(dbase_create($file, -1)); -@unlink($file); - -var_dump(dbase_create("", "")); - -echo "Done\n"; -?> ---EXPECTF-- -int(%d) - -Warning: dbase_create(): unknown field type 'E' in %s on line %d -bool(false) - -Warning: dbase_create(): unknown field type '-' in %s on line %d -bool(false) -int(%d) - -Warning: dbase_create(): expected field name as first element of list in field 0 in %s on line %d -bool(false) -int(%d) - -Warning: dbase_create(): Expected array as second parameter in %s on line %d -bool(false) - -Warning: dbase_create(): Expected array as second parameter in %s on line %d -bool(false) -Done diff --git a/ext/dbase/tests/002.phpt b/ext/dbase/tests/002.phpt deleted file mode 100644 index 5c866443f5..0000000000 --- a/ext/dbase/tests/002.phpt +++ /dev/null @@ -1,54 +0,0 @@ ---TEST-- -dbase_open() tests ---SKIPIF-- -<?php if (!extension_loaded("dbase")) print "skip"; ?> ---FILE-- -<?php - -$file = dirname(__FILE__)."/002.dbf"; -@unlink($file); - -$fp = fopen($file, "w"); -fclose($fp); - -var_dump(dbase_open($file, -1)); -var_dump(dbase_open($file, 1000)); -var_dump(dbase_open($file, 0)); -var_dump(dbase_open($file."nonex", 0)); -var_dump(dbase_open("", 0)); - -@unlink($file); - -$def = array( - array("date", "D"), - array("name", "C", 50), - array("age", "N", 3, 0), - array("email", "C", 128), - array("ismember", "L") -); - -var_dump(dbase_create($file, $def)); -var_dump(dbase_open($file, 0)); - -@unlink($file); - -echo "Done\n"; -?> ---EXPECTF-- -Warning: dbase_open(): Invalid access mode -1 in %s on line %d -bool(false) - -Warning: dbase_open(): unable to open database %s in %s on line %d -bool(false) - -Warning: dbase_open(): unable to open database %s in %s on line %d -bool(false) - -Warning: dbase_open(): unable to open database %s in %s on line %d -bool(false) - -Warning: dbase_open(): unable to open database in %s on line %d -bool(false) -int(%d) -int(%d) -Done diff --git a/ext/dbase/tests/bug31754.phpt b/ext/dbase/tests/bug31754.phpt deleted file mode 100644 index 32f802b57b..0000000000 --- a/ext/dbase/tests/bug31754.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Bug #31754: (dbase_open() fails for mode = 1) ---SKIPIF-- -<?php -if (!extension_loaded('dbase')) { - die('skip dbase extension not available'); -} -?> ---FILE-- -<?php - -// database "definition" -$def = array( - array("foo", "L") -); - -// creation -$dbh = dbase_create('/tmp/bug31754.dbf', array(array('foo', 'L'))); -dbase_close($dbh); - -$dbh = dbase_open('/tmp/bug31754.dbf', 1); -unlink('/tmp/bug31754.dbf'); - -?> ---EXPECTF-- -Warning: dbase_open(): Cannot open /tmp/bug31754.dbf in write-only mode in %sbug31754.php on line %d |