summaryrefslogtreecommitdiff
path: root/ext/dba/tests/bug62490.phpt
blob: 3e5c1e82ca33786b44db002c1e106dbd57cdebde (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
29
30
31
32
33
34
35
36
37
38
39
40
41
--TEST--
Bug #62490 (dba_delete returns true on missing item (inifile))
--SKIPIF--
<?php
$handler = "inifile";
include "skipif.inc";
?>
--FILE--
<?php
$handler = "inifile";
include "test.inc";

$dba = dba_open($db_filename, "n", $handler)
    or die;
for ($i = 0; $i < 3; ++$i) {
    echo "insert $i:";
    var_dump(dba_insert("a", $i, $dba));
}

echo "exists:";
var_dump(dba_exists("a", $dba));
echo "delete:";
var_dump(dba_delete("a", $dba));
echo "exists:";
var_dump(dba_exists("a", $dba));
echo "delete:";
var_dump(dba_delete("a", $dba));

?>
--CLEAN--
<?php
include "clean.inc";
?>
--EXPECT--
insert 0:bool(true)
insert 1:bool(true)
insert 2:bool(true)
exists:bool(true)
delete:bool(true)
exists:bool(false)
delete:bool(false)