xref: /PHP-8.1/ext/dba/tests/bug71514.phpt (revision 74859783)
1--TEST--
2Bug #71514 (Bad dba_replace condition because of wrong API usage)
3--EXTENSIONS--
4dba
5--SKIPIF--
6<?php
7if (!in_array('inifile', dba_handlers())) die('skip inifile handler not available');
8?>
9--FILE--
10<?php
11$filename = __DIR__ . DIRECTORY_SEPARATOR . 'bug71514.ini';
12
13$db = dba_open($filename, 'c', 'inifile');
14
15dba_insert('foo', 'value1', $db);
16dba_replace('foo', 'value2', $db);
17var_dump(dba_fetch('foo', $db));
18
19dba_close($db);
20?>
21--EXPECT--
22string(6) "value2"
23--CLEAN--
24<?php
25$filename = __DIR__ . DIRECTORY_SEPARATOR . 'bug71514.ini';
26unlink($filename);
27?>
28