xref: /PHP-7.3/ext/dba/tests/dba_db4_014.phpt (revision 782352c5)
1--TEST--
2DBA DB4 File open("wl") & Insert 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
12$handler = "db4";
13require_once(dirname(__FILE__) .'/test.inc');
14echo "database handler: $handler\n";
15
16if (($db_file = dba_open($db_filename, "wl", $handler)) !== FALSE) {
17    echo "database file opened\n";
18    dba_close($db_file);
19} else {
20    echo "Error creating $db_filename\n";
21}
22
23?>
24--CLEAN--
25<?php
26require(dirname(__FILE__) .'/clean.inc');
27?>
28--EXPECTF--
29database handler: db4
30
31Warning: dba_open(%stest0.dbm,wl): Driver initialization failed for handler: db4: No such file or directory in %sdba_db4_014.php on line %d
32Error creating %stest0.dbm
33