dba011.phpt 887 B

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. DBA argument tests
  3. --EXTENSIONS--
  4. dba
  5. --SKIPIF--
  6. <?php
  7. require_once(__DIR__ .'/skipif.inc');
  8. die("info $HND handler used");
  9. ?>
  10. --FILE--
  11. <?php
  12. require_once(__DIR__ .'/test.inc');
  13. echo "database handler: $handler\n";
  14. var_dump(dba_open($db_file, 'n'));
  15. var_dump(dba_open($db_file, 'n', 'bogus'));
  16. var_dump(dba_open($db_file, 'q', $handler));
  17. var_dump(dba_open($db_file, 'nq', $handler));
  18. var_dump(dba_open($db_file, 'n', $handler, 2, 3, 4, 5, 6, 7, 8));
  19. ?>
  20. --CLEAN--
  21. <?php
  22. require(__DIR__ .'/clean.inc');
  23. ?>
  24. --EXPECTF--
  25. database handler: flatfile
  26. resource(%d) of type (dba)
  27. Warning: dba_open(%stest0.dbm,n): No such handler: bogus in %sdba011.php on line %d
  28. bool(false)
  29. Warning: dba_open(%stest0.dbm,q): Illegal DBA mode in %sdba011.php on line %d
  30. bool(false)
  31. Warning: dba_open(%stest0.dbm,nq): Illegal DBA mode in %sdba011.php on line %d
  32. bool(false)
  33. resource(%d) of type (dba)