1--TEST-- 2DBA DB2 handler test 3--EXTENSIONS-- 4dba 5--SKIPIF-- 6<?php 7require_once __DIR__ . '/setup/setup_dba_tests.inc'; 8check_skip('db2'); 9?> 10--FILE-- 11<?php 12require_once __DIR__ . '/setup/setup_dba_tests.inc'; 13$db_name = 'dba_db2.db'; 14 15$handler = 'db2'; 16run_standard_tests($handler, $db_name); 17 18?> 19--CLEAN-- 20<?php 21require_once __DIR__ . '/setup/setup_dba_tests.inc'; 22$db_name = 'dba_db2.db'; 23cleanup_standard_db($db_name); 24?> 25--EXPECT-- 26=== RUNNING WITH FILE LOCK === 27Remove key 1 and 3 28bool(true) 29bool(true) 30Try to remove key 1 again 31bool(false) 32[key10]name10: Content String 10 33[key30]name30: Content String 30 34key2: Content String 2 35key4: Another Content String 36key5: The last content string 37name9: Content String 9 38Total keys: 6 39Key 1 exists? N 40Key 2 exists? Y 41Key 3 exists? N 42Key 4 exists? Y 43Key 5 exists? Y 44Replace second key data 45bool(true) 46Content 2 replaced 47Read during write: not allowed 48Expected: Added a new data entry 49Expected: Failed to insert data for already used key 50Replace second key data 51bool(true) 52Delete "key4" 53bool(true) 54Fetch "key2": Content 2 replaced 2nd time 55Fetch "key number 6": The 6th value 56array(6) { 57 ["[key10]name10"]=> 58 string(17) "Content String 10" 59 ["[key30]name30"]=> 60 string(17) "Content String 30" 61 ["key number 6"]=> 62 string(13) "The 6th value" 63 ["key2"]=> 64 string(27) "Content 2 replaced 2nd time" 65 ["key5"]=> 66 string(23) "The last content string" 67 ["name9"]=> 68 string(16) "Content String 9" 69} 70=== RUNNING WITH DB LOCK (default) === 71SAME OUTPUT AS PREVIOUS RUN 72=== RUNNING WITH NO LOCK === 73SAME OUTPUT AS PREVIOUS RUN (modulo read during write due to no lock) 74