xref: /PHP-5.3/ext/dba/tests/dba_db4_sync.phpt (revision 7b329d5a)
1--TEST--
2DBA DB4 Sync Test
3--SKIPIF--
4<?php
5$handler = "db4";
6require_once(dirname(__FILE__) .'/skipif.inc');
7die("info $HND handler used");
8?>
9--FILE--
10<?php
11$handler = "db4";
12require_once(dirname(__FILE__) .'/test.inc');
13echo "database handler: $handler\n";
14if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) {
15    dba_insert("key1", "Content String 1", $db_file);
16    dba_insert("key2", "Content String 2", $db_file);
17    for ($i=1; $i<3; $i++) {
18        echo dba_exists("key$i", $db_file) ? "Y" : "N";
19    }
20    echo "\n";
21    var_dump(dba_sync($db_file));
22    dba_close($db_file);
23} else {
24    echo "Error creating database\n";
25}
26
27?>
28===DONE===
29<?php exit(0); ?>
30--CLEAN--
31<?php
32require(dirname(__FILE__) .'/clean.inc');
33?>
34--EXPECTF--
35database handler: db4
36YY
37bool(true)
38===DONE===
39