xref: /PHP-8.0/ext/dba/tests/dba_db4_sync.phpt (revision a555cc0b)
1--TEST--
2DBA DB4 Sync Test
3--SKIPIF--
4<?php
5$handler = "db4";
6require_once(__DIR__ .'/skipif.inc');
7die("info $HND handler used");
8?>
9--FILE--
10<?php
11$handler = "db4";
12require_once(__DIR__ .'/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--CLEAN--
29<?php
30require(__DIR__ .'/clean.inc');
31?>
32--EXPECT--
33database handler: db4
34YY
35bool(true)
36