xref: /PHP-5.5/ext/dba/tests/dba_db4_handlers.phpt (revision 9ef6a73d)
1--TEST--
2DBA DB4 Handler Test
3--SKIPIF--
4<?php
5$handler="db4";
6require(dirname(__FILE__) .'/skipif.inc');
7die("info $HND handler used");
8?>
9--FILE--
10<?php
11$handler="db4";
12require_once(dirname(__FILE__) .'/test.inc');
13echo "database handler: $handler\n";
14
15function check($h)
16{
17    if (!$h) {
18        return;
19    }
20
21    foreach ($h as $key) {
22        if ($key === "db4") {
23            echo "Success: db4 enabled\n";
24        }
25    }
26}
27
28echo "Test 1\n";
29
30check(dba_handlers());
31
32echo "Test 2 - full info\n";
33$h = dba_handlers(1);
34foreach ($h as $key => $val) {
35    if ($key === "db4") {
36        echo "$val\n";
37    }
38}
39
40?>
41--CLEAN--
42<?php
43require(dirname(__FILE__) .'/clean.inc');
44?>
45--EXPECTREGEX--
46database handler: db4
47Test 1
48Success: db4 enabled
49Test 2 - full info
50.*Berkeley DB (4|5).*
51