dba_dbm.phpt 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --TEST--
  2. DBA DBM handler test
  3. --EXTENSIONS--
  4. dba
  5. --SKIPIF--
  6. <?php
  7. $handler = 'dbm';
  8. require_once __DIR__ .'/skipif.inc';
  9. ?>
  10. --FILE--
  11. <?php
  12. $handler = 'dbm';
  13. require_once __DIR__ .'/test.inc';
  14. require_once __DIR__ .'/dba_handler.inc';
  15. ?>
  16. --CLEAN--
  17. <?php
  18. require(__DIR__ .'/clean.inc');
  19. ?>
  20. --EXPECT--
  21. database handler: dbm
  22. 3NYNYY
  23. Content String 2
  24. Content 2 replaced
  25. Read during write: not allowed
  26. "key number 6" written
  27. Failed to write "key number 6" 2nd time
  28. Content 2 replaced 2nd time
  29. The 6th value
  30. array(3) {
  31. ["key number 6"]=>
  32. string(13) "The 6th value"
  33. ["key2"]=>
  34. string(27) "Content 2 replaced 2nd time"
  35. ["key5"]=>
  36. string(23) "The last content string"
  37. }
  38. --NO-LOCK--
  39. 3NYNYY
  40. Content String 2
  41. Content 2 replaced
  42. Read during write: not allowed
  43. "key number 6" written
  44. Failed to write "key number 6" 2nd time
  45. Content 2 replaced 2nd time
  46. The 6th value
  47. array(3) {
  48. ["key number 6"]=>
  49. string(13) "The 6th value"
  50. ["key2"]=>
  51. string(27) "Content 2 replaced 2nd time"
  52. ["key5"]=>
  53. string(23) "The last content string"
  54. }