1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 08:28:26 +02:00
Files
archived-php-src/ext/dba/tests/bug71514.phpt
T
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

28 lines
569 B
PHP

--TEST--
Bug #71514 (Bad dba_replace condition because of wrong API usage)
--EXTENSIONS--
dba
--SKIPIF--
<?php
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);
?>
--EXPECT--
string(6) "value2"
--CLEAN--
<?php
$filename = __DIR__ . DIRECTORY_SEPARATOR . 'bug71514.ini';
unlink($filename);
?>