xref: /PHP-7.3/ext/dba/tests/dba_tcadb.phpt (revision 17ccbeec)
1--TEST--
2DBA 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--
24database handler: tcadb
253NYNYY
26Content String 2
27Content 2 replaced
28Read during write: not allowed
29"key number 6" written
30Failed to write "key number 6" 2nd time
31Content 2 replaced 2nd time
32The 6th value
33array(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--
423NYNYY
43Content String 2
44Content 2 replaced
45Read during write: not allowed
46"key number 6" written
47Failed to write "key number 6" 2nd time
48Content 2 replaced 2nd time
49The 6th value
50array(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===
59