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