xref: /PHP-8.1/ext/dba/tests/bug72885.phpt (revision b5a14e6c)
1--TEST--
2Bug #72885 flatfile: dba_fetch() fails to read replaced entry
3--EXTENSIONS--
4dba
5--SKIPIF--
6<?php
7$handler = "flatfile";
8require_once(__DIR__ .'/skipif.inc');
9?>
10--FILE--
11<?php
12
13require_once(__DIR__ .'/test.inc');
14
15$db = dba_open($db_filename, 'c', 'flatfile');
16dba_insert('foo', 'bar', $db);
17var_dump(dba_replace('foo', 'baz', $db));
18var_dump(dba_fetch('foo', $db));
19dba_close($db);
20
21?>
22--CLEAN--
23<?php
24require_once(__DIR__ .'/clean.inc');
25?>
26--EXPECT--
27bool(true)
28string(3) "baz"
29