1--TEST--
2DBA check behaviour of array keys (inifile version)
3--EXTENSIONS--
4dba
5--SKIPIF--
6<?php
7require_once __DIR__ . '/setup/setup_dba_tests.inc';
8check_skip('inifile');
9?>
10--FILE--
11<?php
12require_once __DIR__ . '/setup/setup_dba_tests.inc';
13$name = __DIR__ . '/array_keys_basic.db';
14
15$db = dba_open($name, 'c', 'inifile');
16
17var_dump(dba_insert(['group', 'name'], 'Normal group', $db));
18var_dump(dba_insert(['group', ''], 'Empty name', $db));
19var_dump(dba_insert(['', 'name'], 'Empty group', $db));
20var_dump(dba_insert(['', ''], 'Empty keys', $db));
21var_dump(dba_fetch(['group', 'name'], $db));
22var_dump(dba_fetch(['group', ''], $db));
23var_dump(dba_fetch(['', 'name'], $db));
24var_dump(dba_fetch(['', ''], $db));
25dba_close($db);
26
27?>
28--CLEAN--
29<?php
30require_once __DIR__ . '/setup/setup_dba_tests.inc';
31$db_name = __DIR__ . '/array_keys_basic.db';
32cleanup_standard_db($db_name);
33?>
34--EXPECTF--
35bool(true)
36bool(true)
37bool(true)
38bool(true)
39string(12) "Normal group"
40string(0) ""
41string(11) "Empty group"
42bool(false)
43