xref: /PHP-8.2/ext/dba/tests/dba_cdb.phpt (revision eddab740)
1--TEST--
2DBA CDB handler test
3--EXTENSIONS--
4dba
5--SKIPIF--
6<?php
7require_once __DIR__ . '/setup/setup_dba_tests.inc';
8check_skip('cdb');
9?>
10--FILE--
11<?php
12require_once __DIR__ . '/setup/setup_dba_tests.inc';
13$db_name = 'dba_cdb.db';
14
15set_up_cdb_db_and_run($db_name);
16
17?>
18--CLEAN--
19<?php
20require_once __DIR__ . '/setup/setup_dba_tests.inc';
21$db_name = 'dba_cdb.db';
22cleanup_standard_db($db_name);
23?>
24--EXPECT--
25Key 1 exists? Y
26Key 2 exists? Y
27Key 3 exists? Y
28Key 4 exists? Y
29Key 5 exists? Y
30array(8) {
31  ["[key10]name10"]=>
32  string(17) "Content String 10"
33  ["[key30]name30"]=>
34  string(17) "Content String 30"
35  ["key1"]=>
36  string(16) "Content String 1"
37  ["key2"]=>
38  string(16) "Content String 2"
39  ["key3"]=>
40  string(20) "Third Content String"
41  ["key4"]=>
42  string(22) "Another Content String"
43  ["key5"]=>
44  string(23) "The last content string"
45  ["name9"]=>
46  string(16) "Content String 9"
47}
48--NO-LOCK--
49Key 1 exists? Y
50Key 2 exists? Y
51Key 3 exists? Y
52Key 4 exists? Y
53Key 5 exists? Y
54array(8) {
55  ["[key10]name10"]=>
56  string(17) "Content String 10"
57  ["[key30]name30"]=>
58  string(17) "Content String 30"
59  ["key1"]=>
60  string(16) "Content String 1"
61  ["key2"]=>
62  string(16) "Content String 2"
63  ["key3"]=>
64  string(20) "Third Content String"
65  ["key4"]=>
66  string(22) "Another Content String"
67  ["key5"]=>
68  string(23) "The last content string"
69  ["name9"]=>
70  string(16) "Content String 9"
71}
72