xref: /PHP-8.1/ext/dba/tests/dba_db4_014.phpt (revision b5a14e6c)
1--TEST--
2DBA DB4 File open("wl") & Insert Test
3--EXTENSIONS--
4dba
5--SKIPIF--
6<?php
7$handler = "db4";
8require_once(__DIR__ .'/skipif.inc');
9die("info $HND handler used");
10?>
11--FILE--
12<?php
13
14$handler = "db4";
15require_once(__DIR__ .'/test.inc');
16echo "database handler: $handler\n";
17
18if (($db_file = dba_open($db_filename, "wl", $handler)) !== FALSE) {
19    echo "database file opened\n";
20    dba_close($db_file);
21} else {
22    echo "Error creating $db_filename\n";
23}
24
25?>
26--CLEAN--
27<?php
28require(__DIR__ .'/clean.inc');
29?>
30--EXPECTF--
31database handler: db4
32
33Warning: dba_open(%stest0.dbm,wl): Driver initialization failed for handler: db4: No such file or directory in %sdba_db4_014.php on line %d
34Error creating %stest0.dbm
35