Annotation of embedaddon/php/ext/dba/tests/dba_db4_006.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: DBA DB4 New File Creation popen("n") & Insert Test
! 3: --SKIPIF--
! 4: <?php
! 5: $handler = "db4";
! 6: require_once(dirname(__FILE__) .'/skipif.inc');
! 7: die("info $HND handler used");
! 8: ?>
! 9: --FILE--
! 10: <?php
! 11:
! 12: $handler = "db4";
! 13: require_once(dirname(__FILE__) .'/test.inc');
! 14: echo "database handler: $handler\n";
! 15: if (($db_file = dba_popen($db_filename, "n", $handler)) !== FALSE) {
! 16: echo "database file created\n";
! 17: dba_insert("key1", "This is a test insert", $db_file);
! 18: echo dba_fetch("key1", $db_file), "\n";
! 19: dba_close($db_file);
! 20: } else {
! 21: echo "Error creating $db_filename\n";
! 22: }
! 23:
! 24: ?>
! 25: --CLEAN--
! 26: <?php
! 27: require(dirname(__FILE__) .'/clean.inc');
! 28: ?>
! 29: --EXPECTF--
! 30: database handler: db4
! 31: database file created
! 32: This is a test insert
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>