summaryrefslogtreecommitdiff
path: root/ext/dba/tests/bug71514.phpt
blob: 08338f3793c1ab37b18cfe7237aca8d979b41888 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
Bug #71514 (Bad dba_replace condition because of wrong API usage)
--SKIPIF--
<?php
if (!extension_loaded('dba')) die('skip dba extension not available');
if (!in_array('inifile', dba_handlers())) die('skip inifile handler not available');
?>
--FILE--
<?php
$filename = __DIR__ . DIRECTORY_SEPARATOR . 'bug71514.ini';

$db = dba_open($filename, 'c', 'inifile');

dba_insert('foo', 'value1', $db);
dba_replace('foo', 'value2', $db);
var_dump(dba_fetch('foo', $db));

dba_close($db);
?>
==DONE==
--EXPECT--
string(6) "value2"
==DONE==
--CLEAN--
<?php
$filename = __DIR__ . DIRECTORY_SEPARATOR . 'bug71514.ini';
unlink($filename);
?>