dba_tcadb.phpt 1.2 KB

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