Skip to content

Commit 87728ea

Browse files
author
felipe
committed
- Fix tests
git-svn-id: http://svn.php.net/repository/php/php-src/trunk@312286 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent 5b9659c commit 87728ea

8 files changed

+126
-54
lines changed

ext/standard/tests/file/file_get_contents_variation8.phpt

+4-4
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ Warning: file_get_contents( ): failed to open stream: No such file or directory
6969
bool(false)
7070
-- Iteration 6 --
7171

72-
Warning: file_get_contents(): Filename cannot be empty in %s on line %d
73-
bool(false)
72+
Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s on line %d
73+
NULL
7474
-- Iteration 7 --
7575

76-
Warning: file_get_contents() expects parameter 1 to be string, array given in %s on line %d
76+
Warning: file_get_contents() expects parameter 1 to be a valid path, array given in %s on line %d
7777
NULL
7878
-- Iteration 8 --
7979

80-
Warning: file_get_contents(/no/such/file/dir): failed to open stream: %s in %s on line %d
80+
Warning: file_get_contents(/no/such/file/dir): failed to open stream: No such file or directory in %s on line %d
8181
bool(false)
8282
-- Iteration 9 --
8383

Binary file not shown.

ext/standard/tests/file/file_variation2.phpt

+5-5
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,19 @@ Error: 2 - file(0.5): failed to open stream: No such file or directory, %s(%d)
145145
bool(false)
146146

147147
--empty array--
148-
Error: 2 - file() expects parameter 1 to be string, array given, %s(%d)
148+
Error: 2 - file() expects parameter 1 to be a valid path, array given, %s(%d)
149149
NULL
150150

151151
--int indexed array--
152-
Error: 2 - file() expects parameter 1 to be string, array given, %s(%d)
152+
Error: 2 - file() expects parameter 1 to be a valid path, array given, %s(%d)
153153
NULL
154154

155155
--associative array--
156-
Error: 2 - file() expects parameter 1 to be string, array given, %s(%d)
156+
Error: 2 - file() expects parameter 1 to be a valid path, array given, %s(%d)
157157
NULL
158158

159159
--nested arrays--
160-
Error: 2 - file() expects parameter 1 to be string, array given, %s(%d)
160+
Error: 2 - file() expects parameter 1 to be a valid path, array given, %s(%d)
161161
NULL
162162

163163
--uppercase NULL--
@@ -197,7 +197,7 @@ Error: 2 - file(Class A object): failed to open stream: %s, %s(%d)
197197
bool(false)
198198

199199
--instance of classWithoutToString--
200-
Error: 2 - file() expects parameter 1 to be string, object given, %s(%d)
200+
Error: 2 - file() expects parameter 1 to be a valid path, object given, %s(%d)
201201
NULL
202202

203203
--undefined var--

ext/standard/tests/file/fnmatch_error.phpt

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ echo "\n*** Done ***\n";
3636
?>
3737
--EXPECTF--
3838
*** Testing error conditions for fnmatch() ***
39-
Warning: fnmatch() expects parameter 1 to be string, array given in %s on line %d%d
39+
Warning: fnmatch() expects parameter 1 to be a valid path, array given in %s on line %d
4040
NULL
4141

42-
Warning: fnmatch() expects parameter 1 to be string, resource given in %s on line %d%d
42+
Warning: fnmatch() expects parameter 1 to be a valid path, resource given in %s on line %d
4343
NULL
4444

45-
Warning: fnmatch() expects parameter 1 to be string, object given in %s on line %d%d
45+
Warning: fnmatch() expects parameter 1 to be a valid path, object given in %s on line %d
4646
NULL
4747

4848
Warning: fnmatch() expects at least 2 parameters, 1 given in %s on line %d%d

ext/standard/tests/file/fnmatch_variation.phpt

+100-34
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ match($null_arr, $null_arr);
134134

135135
echo "\n*** Done ***\n";
136136
?>
137-
--EXPECT--
137+
--EXPECTF--
138138
*** Testing fnmatch() with file and various patterns ***
139139
-- Iteration 0 --
140140
bool(true)
@@ -183,9 +183,13 @@ bool(false)
183183
-- Iteration 22 --
184184
bool(false)
185185
-- Iteration 23 --
186-
bool(false)
186+
187+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
188+
NULL
187189
-- Iteration 24 --
188-
bool(false)
190+
191+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
192+
NULL
189193
-- Iteration 25 --
190194
bool(false)
191195
-- Iteration 26 --
@@ -259,44 +263,84 @@ bool(true)
259263
--- With Strings ---
260264
-- Iteration 0 --
261265
bool(true)
266+
267+
Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
268+
NULL
262269
bool(true)
263-
bool(true)
264-
bool(false)
270+
271+
Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
272+
NULL
265273
bool(false)
266274
bool(true)
267275
-- Iteration 1 --
268-
bool(true)
269-
bool(true)
270-
bool(true)
271-
bool(false)
272-
bool(false)
273-
bool(true)
276+
277+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
278+
NULL
279+
280+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
281+
NULL
282+
283+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
284+
NULL
285+
286+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
287+
NULL
288+
289+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
290+
NULL
291+
292+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
293+
NULL
274294
-- Iteration 2 --
275295
bool(true)
296+
297+
Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
298+
NULL
276299
bool(true)
277-
bool(true)
278-
bool(false)
300+
301+
Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
302+
NULL
279303
bool(false)
280304
bool(true)
281305
-- Iteration 3 --
282-
bool(false)
283-
bool(false)
284-
bool(false)
285-
bool(true)
286-
bool(false)
287-
bool(false)
306+
307+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
308+
NULL
309+
310+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
311+
NULL
312+
313+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
314+
NULL
315+
316+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
317+
NULL
318+
319+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
320+
NULL
321+
322+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
323+
NULL
288324
-- Iteration 4 --
289325
bool(false)
326+
327+
Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
328+
NULL
290329
bool(false)
291-
bool(false)
292-
bool(false)
330+
331+
Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
332+
NULL
293333
bool(true)
294334
bool(false)
295335
-- Iteration 5 --
296336
bool(true)
337+
338+
Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
339+
NULL
297340
bool(true)
298-
bool(true)
299-
bool(false)
341+
342+
Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
343+
NULL
300344
bool(false)
301345
bool(true)
302346

@@ -397,42 +441,64 @@ bool(true)
397441
bool(true)
398442
bool(true)
399443
bool(true)
400-
bool(true)
444+
445+
Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
446+
NULL
401447
bool(false)
402448
bool(false)
403449
-- Iteration 1 --
404450
bool(true)
405451
bool(true)
406452
bool(true)
407-
bool(true)
453+
454+
Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
455+
NULL
408456
bool(false)
409457
bool(false)
410458
-- Iteration 2 --
411459
bool(true)
412460
bool(true)
413461
bool(true)
414-
bool(true)
462+
463+
Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
464+
NULL
415465
bool(false)
416466
bool(false)
417467
-- Iteration 3 --
418-
bool(true)
419-
bool(true)
420-
bool(true)
421-
bool(true)
422-
bool(false)
423-
bool(false)
468+
469+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
470+
NULL
471+
472+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
473+
NULL
474+
475+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
476+
NULL
477+
478+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
479+
NULL
480+
481+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
482+
NULL
483+
484+
Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d
485+
NULL
424486
-- Iteration 4 --
425487
bool(false)
426488
bool(false)
427489
bool(false)
428-
bool(false)
490+
491+
Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
492+
NULL
429493
bool(true)
430494
bool(false)
431495
-- Iteration 5 --
432496
bool(false)
433497
bool(false)
434498
bool(false)
435-
bool(false)
499+
500+
Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d
501+
NULL
436502
bool(false)
437503
bool(true)
438504

ext/standard/tests/file/mkdir_rmdir_variation2.phpt

+7-3
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,17 @@ Warning: rmdir(%s/mkdir_variation2/): %s on line %d
6464
bool(false)
6565

6666
*** Testing mkdir() and rmdir() for binary safe functionality ***
67-
bool(true)
68-
bool(true)
67+
68+
Warning: mkdir() expects parameter 1 to be a valid path, string given in %s on line %d
69+
bool(false)
70+
71+
Warning: rmdir(%s): No such file or directory in %s on line %d
72+
bool(false)
6973

7074
*** Testing mkdir() with miscelleneous input ***
7175
bool(true)
7276

73-
Warning: mkdir(): Permission denied in %sfile/mkdir_rmdir_variation2.php on line %d
77+
Warning: mkdir(): Permission denied in %s on line %d
7478
bool(false)
7579
bool(true)
7680
Done
33 Bytes
Binary file not shown.

ext/standard/tests/file/rename_variation13.phpt

+7-5
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,21 @@ Warning: rename( ,%s/renameVar13/afile.tmp): No such file or directory in %s on
9999
bool(false)
100100
-- testing '%s' --
101101

102-
Warning: rename(%s/renameVar13/afile.tmp,): %s in %s on line %d
102+
Warning: rename() %s in %s on line %d
103103
bool(false)
104104

105-
Warning: rename(,%s/renameVar13/afile.tmp): %s in %s on line %d
105+
Warning: file_exists() expects parameter 1 to be a valid path, string given in %s on line %d
106+
107+
Warning: rename() expects parameter 1 to be a valid path, string given in %s on line %d
106108
bool(false)
107109
-- testing 'Array' --
108110

109-
Warning: rename() expects parameter 2 to be string, array given in %s on line %d
111+
Warning: rename() expects parameter 2 to be a valid path, array given in %s on line %d
110112
bool(false)
111113

112-
Warning: file_exists() expects parameter 1 to be string, array given in %s on line %d
114+
Warning: file_exists() expects parameter 1 to be a valid path, array given in %s on line %d
113115

114-
Warning: rename() expects parameter 1 to be string, array given in %s on line %d
116+
Warning: rename() expects parameter 1 to be a valid path, array given in %s on line %d
115117
bool(false)
116118
-- testing '/no/such/file/dir' --
117119

0 commit comments

Comments
 (0)