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