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