dba014.phpt 661 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. DBA with array key with array containing too many elements
  3. --SKIPIF--
  4. <?php
  5. require_once(dirname(__FILE__) .'/skipif.inc');
  6. die("info $HND handler used");
  7. ?>
  8. --FILE--
  9. <?php
  10. require_once(dirname(__FILE__) .'/test.inc');
  11. echo "database handler: $handler\n";
  12. if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
  13. dba_insert(array("a", "b", "c"), "Content String 2", $db_file);
  14. } else {
  15. echo "Error creating database\n";
  16. }
  17. ?>
  18. --CLEAN--
  19. <?php
  20. require(dirname(__FILE__) .'/clean.inc');
  21. ?>
  22. --EXPECTF--
  23. database handler: %s
  24. Catchable fatal error: dba_insert(): Key does not have exactly two elements: (key, name) in %sdba014.php on line %d