Annotation of embedaddon/php/ext/dba/tests/dba_db4_017.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: DBA DB4 file creation dba_open("cd")
! 3: --SKIPIF--
! 4: <?php
! 5: $handler = "db4";
! 6: require_once(dirname(__FILE__) .'/skipif.inc');
! 7: ?>
! 8: --FILE--
! 9: <?php
! 10:
! 11: $handler = "db4";
! 12: require_once(dirname(__FILE__) .'/test.inc');
! 13: echo "database handler: $handler\n";
! 14:
! 15: if (($db_file = dba_open($db_filename, "cd", $handler)) !== FALSE) {
! 16: if (file_exists($db_filename)) {
! 17: echo "database file created\n";
! 18: var_dump(dba_insert("key1", "This is a test insert", $db_file));
! 19: echo dba_fetch("key1", $db_file), "\n";
! 20: dba_close($db_file);
! 21: } else {
! 22: echo "File did not get created\n";
! 23: }
! 24: } else {
! 25: echo "Error creating $db_filename\n";
! 26: }
! 27:
! 28: ?>
! 29: --CLEAN--
! 30: <?php
! 31: require(dirname(__FILE__) .'/clean.inc');
! 32: ?>
! 33: --EXPECTF--
! 34: database handler: db4
! 35: database file created
! 36: bool(true)
! 37: This is a test insert
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>