bug71514.phpt 569 B

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