Annotation of embedaddon/php/ext/dba/tests/dba_db4_013.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: DBA DB4 File open("rl") & 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:
! 16: if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) {
! 17: echo "database file created\n";
! 18: dba_close($db_file);
! 19: }
! 20:
! 21: if (($db_file = dba_popen($db_filename, "rl", $handler)) !== FALSE) {
! 22: echo "database file opened\n";
! 23: dba_insert("key1", "This is a test insert", $db_file);
! 24: echo dba_fetch("key1", $db_file), "\n";
! 25: dba_close($db_file);
! 26: } else {
! 27: echo "Error creating $db_filename\n";
! 28: }
! 29:
! 30: ?>
! 31: --CLEAN--
! 32: <?php
! 33: require(dirname(__FILE__) .'/clean.inc');
! 34: ?>
! 35: --EXPECTF--
! 36: database handler: db4
! 37: database file created
! 38: database file opened
! 39:
! 40: Warning: dba_insert(): You cannot perform a modification to a database without proper access in %sdba_db4_013.php on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>