Skip to content

Commit 4d418e5

Browse files
committed
Add creation matrix test for other drivers
TODO Actually test GDBM as cannot test QDBM and it at the same time due to conflicts
1 parent 3902582 commit 4d418e5

8 files changed

+1280
-3
lines changed
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
--TEST--
2+
DBA CDB opening matrix of combination
3+
--EXTENSIONS--
4+
dba
5+
--SKIPIF--
6+
<?php
7+
require_once __DIR__ . '/setup/setup_dba_tests.inc';
8+
check_skip('cdb');
9+
?>
10+
--FILE--
11+
<?php
12+
require_once __DIR__ . '/setup/setup_dba_tests.inc';
13+
14+
$handler = 'cdb';
15+
run_creation_tests($handler);
16+
17+
?>
18+
--CLEAN--
19+
<?php
20+
require_once __DIR__ . '/setup/setup_dba_tests.inc';
21+
$handler = 'cdb';
22+
clean_creation_tests($handler);
23+
?>
24+
--EXPECTF--
25+
=== OPENING NON-EXISTING FILE ===
26+
Mode parameter is "rl":
27+
28+
Warning: dba_open(cdb_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
29+
Opening DB failed
30+
Mode parameter is "rd":
31+
32+
Warning: dba_open(cdb_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
33+
Opening DB failed
34+
Mode parameter is "r-":
35+
36+
Warning: dba_open(cdb_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
37+
Opening DB failed
38+
Mode parameter is "r":
39+
40+
Warning: dba_open(cdb_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
41+
Opening DB failed
42+
Mode parameter is "wl":
43+
44+
Warning: dba_open(cdb_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
45+
Opening DB failed
46+
Mode parameter is "wd":
47+
48+
Warning: dba_open(cdb_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
49+
Opening DB failed
50+
Mode parameter is "w-":
51+
52+
Warning: dba_open(cdb_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
53+
Opening DB failed
54+
Mode parameter is "w":
55+
56+
Warning: dba_open(cdb_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
57+
Opening DB failed
58+
Mode parameter is "cl":
59+
60+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
61+
Opening DB failed
62+
Mode parameter is "cd":
63+
64+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
65+
Opening DB failed
66+
Mode parameter is "c-":
67+
68+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
69+
Opening DB failed
70+
Mode parameter is "c":
71+
72+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
73+
Opening DB failed
74+
Mode parameter is "nl":
75+
Cannot fetch insertion
76+
Mode parameter is "nd":
77+
Cannot fetch insertion
78+
Mode parameter is "n-":
79+
Cannot fetch insertion
80+
Mode parameter is "n":
81+
Cannot fetch insertion
82+
=== OPENING EXISTING DB FILE ===
83+
Mode parameter is "rl":
84+
85+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
86+
Insertion failed
87+
Mode parameter is "rd":
88+
89+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
90+
Insertion failed
91+
Mode parameter is "r-":
92+
93+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
94+
Insertion failed
95+
Mode parameter is "r":
96+
97+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
98+
Insertion failed
99+
Mode parameter is "wl":
100+
101+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
102+
Opening DB failed
103+
Mode parameter is "wd":
104+
105+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
106+
Opening DB failed
107+
Mode parameter is "w-":
108+
109+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
110+
Opening DB failed
111+
Mode parameter is "w":
112+
113+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
114+
Opening DB failed
115+
Mode parameter is "cl":
116+
117+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
118+
Opening DB failed
119+
Mode parameter is "cd":
120+
121+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
122+
Opening DB failed
123+
Mode parameter is "c-":
124+
125+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
126+
Opening DB failed
127+
Mode parameter is "c":
128+
129+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
130+
Opening DB failed
131+
Mode parameter is "nl":
132+
Cannot fetch insertion
133+
Mode parameter is "nd":
134+
Cannot fetch insertion
135+
Mode parameter is "n-":
136+
Cannot fetch insertion
137+
Mode parameter is "n":
138+
Cannot fetch insertion
139+
=== OPENING EXISTING RANDOM FILE ===
140+
Mode parameter is "rl":
141+
142+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
143+
Insertion failed
144+
Mode parameter is "rd":
145+
146+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
147+
Insertion failed
148+
Mode parameter is "r-":
149+
150+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
151+
Insertion failed
152+
Mode parameter is "r":
153+
154+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
155+
Insertion failed
156+
Mode parameter is "wl":
157+
158+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
159+
Opening DB failed
160+
Mode parameter is "wd":
161+
162+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
163+
Opening DB failed
164+
Mode parameter is "w-":
165+
166+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
167+
Opening DB failed
168+
Mode parameter is "w":
169+
170+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
171+
Opening DB failed
172+
Mode parameter is "cl":
173+
174+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
175+
Opening DB failed
176+
Mode parameter is "cd":
177+
178+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
179+
Opening DB failed
180+
Mode parameter is "c-":
181+
182+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
183+
Opening DB failed
184+
Mode parameter is "c":
185+
186+
Warning: dba_open(): Driver initialization failed for handler: cdb: Update operations are not supported in %s on line %d
187+
Opening DB failed
188+
Mode parameter is "nl":
189+
Cannot fetch insertion
190+
Mode parameter is "nd":
191+
Cannot fetch insertion
192+
Mode parameter is "n-":
193+
Cannot fetch insertion
194+
Mode parameter is "n":
195+
Cannot fetch insertion
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
--TEST--
2+
DBA flatfile opening matrix of combination
3+
--EXTENSIONS--
4+
dba
5+
--SKIPIF--
6+
<?php
7+
require_once __DIR__ . '/setup/setup_dba_tests.inc';
8+
check_skip('flatfile');
9+
?>
10+
--FILE--
11+
<?php
12+
require_once __DIR__ . '/setup/setup_dba_tests.inc';
13+
14+
$handler = 'flatfile';
15+
run_creation_tests($handler);
16+
17+
?>
18+
--CLEAN--
19+
<?php
20+
require_once __DIR__ . '/setup/setup_dba_tests.inc';
21+
$handler = 'flatfile';
22+
clean_creation_tests($handler);
23+
?>
24+
--EXPECTF--
25+
=== OPENING NON-EXISTING FILE ===
26+
Mode parameter is "rl":
27+
28+
Warning: dba_open(flatfile_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
29+
Opening DB failed
30+
Mode parameter is "rd":
31+
32+
Warning: dba_open(flatfile_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
33+
Opening DB failed
34+
Mode parameter is "r-":
35+
36+
Warning: dba_open(flatfile_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
37+
Opening DB failed
38+
Mode parameter is "r":
39+
40+
Warning: dba_open(flatfile_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
41+
Opening DB failed
42+
Mode parameter is "wl":
43+
44+
Warning: dba_open(flatfile_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
45+
Opening DB failed
46+
Mode parameter is "wd":
47+
48+
Warning: dba_open(flatfile_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
49+
Opening DB failed
50+
Mode parameter is "w-":
51+
52+
Warning: dba_open(flatfile_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
53+
Opening DB failed
54+
Mode parameter is "w":
55+
56+
Warning: dba_open(flatfile_not_existing.db): Failed to open stream: No such file or directory in %s on line %d
57+
Opening DB failed
58+
Mode parameter is "cl":
59+
This is a test insert
60+
Mode parameter is "cd":
61+
This is a test insert
62+
Mode parameter is "c-":
63+
This is a test insert
64+
Mode parameter is "c":
65+
This is a test insert
66+
Mode parameter is "nl":
67+
This is a test insert
68+
Mode parameter is "nd":
69+
This is a test insert
70+
Mode parameter is "n-":
71+
This is a test insert
72+
Mode parameter is "n":
73+
This is a test insert
74+
=== OPENING EXISTING DB FILE ===
75+
Mode parameter is "rl":
76+
77+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
78+
Insertion failed
79+
Mode parameter is "rd":
80+
81+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
82+
Insertion failed
83+
Mode parameter is "r-":
84+
85+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
86+
Insertion failed
87+
Mode parameter is "r":
88+
89+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
90+
Insertion failed
91+
Mode parameter is "wl":
92+
This is a test insert
93+
Mode parameter is "wd":
94+
This is a test insert
95+
Mode parameter is "w-":
96+
This is a test insert
97+
Mode parameter is "w":
98+
This is a test insert
99+
Mode parameter is "cl":
100+
This is a test insert
101+
Mode parameter is "cd":
102+
This is a test insert
103+
Mode parameter is "c-":
104+
This is a test insert
105+
Mode parameter is "c":
106+
This is a test insert
107+
Mode parameter is "nl":
108+
This is a test insert
109+
Mode parameter is "nd":
110+
This is a test insert
111+
Mode parameter is "n-":
112+
This is a test insert
113+
Mode parameter is "n":
114+
This is a test insert
115+
=== OPENING EXISTING RANDOM FILE ===
116+
Mode parameter is "rl":
117+
118+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
119+
Insertion failed
120+
Mode parameter is "rd":
121+
122+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
123+
Insertion failed
124+
Mode parameter is "r-":
125+
126+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
127+
Insertion failed
128+
Mode parameter is "r":
129+
130+
Warning: dba_insert(): You cannot perform a modification to a database without proper access in %s on line %d
131+
Insertion failed
132+
Mode parameter is "wl":
133+
Cannot fetch insertion
134+
Mode parameter is "wd":
135+
Cannot fetch insertion
136+
Mode parameter is "w-":
137+
Cannot fetch insertion
138+
Mode parameter is "w":
139+
Cannot fetch insertion
140+
Mode parameter is "cl":
141+
Cannot fetch insertion
142+
Mode parameter is "cd":
143+
Cannot fetch insertion
144+
Mode parameter is "c-":
145+
Cannot fetch insertion
146+
Mode parameter is "c":
147+
Cannot fetch insertion
148+
Mode parameter is "nl":
149+
This is a test insert
150+
Mode parameter is "nd":
151+
This is a test insert
152+
Mode parameter is "n-":
153+
This is a test insert
154+
Mode parameter is "n":
155+
This is a test insert

0 commit comments

Comments
 (0)