xref: /PHP-5.3/ext/dba/tests/dba003.phpt (revision 7b329d5a)
1--TEST--
2DBA Insert/Replace/Fetch Test
3--SKIPIF--
4<?php
5	require_once(dirname(__FILE__) .'/skipif.inc');
6	die("info $HND handler used");
7?>
8--FILE--
9<?php
10	require_once(dirname(__FILE__) .'/test.inc');
11	echo "database handler: $handler\n";
12	if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
13		dba_insert("key1", "This is a test insert", $db_file);
14		dba_replace("key1", "This is the replacement text", $db_file);
15		$a = dba_fetch("key1", $db_file);
16		dba_close($db_file);
17		echo $a;
18	} else {
19		echo "Error creating database\n";
20	}
21?>
22--CLEAN--
23<?php
24	require(dirname(__FILE__) .'/clean.inc');
25?>
26--EXPECTF--
27database handler: %s
28This is the replacement text
29