From 8f68b4851474d1e69d85ad6c51a6fcf950f5a5de Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sun, 19 Jun 2011 15:43:16 +0000 Subject: [PATCH] - Fix tests --- .../file/file_get_contents_variation8.phpt | 8 +- .../file/file_put_contents_variation8.phpt | Bin 2302 -> 2335 bytes ext/standard/tests/file/file_variation2.phpt | 10 +- ext/standard/tests/file/fnmatch_error.phpt | 6 +- .../tests/file/fnmatch_variation.phpt | 134 +++++++++++++----- .../tests/file/mkdir_rmdir_variation2.phpt | 10 +- .../tests/file/readfile_variation10.phpt | Bin 1786 -> 1819 bytes .../tests/file/rename_variation13.phpt | 12 +- 8 files changed, 126 insertions(+), 54 deletions(-) diff --git a/ext/standard/tests/file/file_get_contents_variation8.phpt b/ext/standard/tests/file/file_get_contents_variation8.phpt index dca75a02ef..40efe26830 100644 --- a/ext/standard/tests/file/file_get_contents_variation8.phpt +++ b/ext/standard/tests/file/file_get_contents_variation8.phpt @@ -69,15 +69,15 @@ Warning: file_get_contents( ): failed to open stream: No such file or directory bool(false) -- Iteration 6 -- -Warning: file_get_contents(): Filename cannot be empty in %s on line %d -bool(false) +Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s on line %d +NULL -- Iteration 7 -- -Warning: file_get_contents() expects parameter 1 to be string, array given in %s on line %d +Warning: file_get_contents() expects parameter 1 to be a valid path, array given in %s on line %d NULL -- Iteration 8 -- -Warning: file_get_contents(/no/such/file/dir): failed to open stream: %s in %s on line %d +Warning: file_get_contents(/no/such/file/dir): failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 9 -- diff --git a/ext/standard/tests/file/file_put_contents_variation8.phpt b/ext/standard/tests/file/file_put_contents_variation8.phpt index 1e27e71334165f687b4bf263cfd56e934dbce78d..d4c0bffca17200e84b10feb2183de88a887a2b7f 100644 GIT binary patch delta 58 zcmew-IA3Uk6#L`}?9w8M3T25onJEedi6t323dJQwnR)4xcd#2yj%WAbL6+RSk=>UO E08^|K7XSbN delta 27 jcmbO)^iObu6#L{_HrL5j>^^M8B}JKe>6 --EXPECTF-- *** Testing error conditions for fnmatch() *** -Warning: fnmatch() expects parameter 1 to be string, array given in %s on line %d%d +Warning: fnmatch() expects parameter 1 to be a valid path, array given in %s on line %d NULL -Warning: fnmatch() expects parameter 1 to be string, resource given in %s on line %d%d +Warning: fnmatch() expects parameter 1 to be a valid path, resource given in %s on line %d NULL -Warning: fnmatch() expects parameter 1 to be string, object given in %s on line %d%d +Warning: fnmatch() expects parameter 1 to be a valid path, object given in %s on line %d NULL Warning: fnmatch() expects at least 2 parameters, 1 given in %s on line %d%d diff --git a/ext/standard/tests/file/fnmatch_variation.phpt b/ext/standard/tests/file/fnmatch_variation.phpt index e65bdd0555..6d28528c1c 100644 --- a/ext/standard/tests/file/fnmatch_variation.phpt +++ b/ext/standard/tests/file/fnmatch_variation.phpt @@ -134,7 +134,7 @@ match($null_arr, $null_arr); echo "\n*** Done ***\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing fnmatch() with file and various patterns *** -- Iteration 0 -- bool(true) @@ -183,9 +183,13 @@ bool(false) -- Iteration 22 -- bool(false) -- Iteration 23 -- -bool(false) + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL -- Iteration 24 -- -bool(false) + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL -- Iteration 25 -- bool(false) -- Iteration 26 -- @@ -259,44 +263,84 @@ bool(true) --- With Strings --- -- Iteration 0 -- bool(true) + +Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d +NULL bool(true) -bool(true) -bool(false) + +Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d +NULL bool(false) bool(true) -- Iteration 1 -- -bool(true) -bool(true) -bool(true) -bool(false) -bool(false) -bool(true) + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL -- Iteration 2 -- bool(true) + +Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d +NULL bool(true) -bool(true) -bool(false) + +Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d +NULL bool(false) bool(true) -- Iteration 3 -- -bool(false) -bool(false) -bool(false) -bool(true) -bool(false) -bool(false) + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL -- Iteration 4 -- bool(false) + +Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d +NULL bool(false) -bool(false) -bool(false) + +Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d +NULL bool(true) bool(false) -- Iteration 5 -- bool(true) + +Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d +NULL bool(true) -bool(true) -bool(false) + +Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d +NULL bool(false) bool(true) @@ -397,42 +441,64 @@ bool(true) bool(true) bool(true) bool(true) -bool(true) + +Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d +NULL bool(false) bool(false) -- Iteration 1 -- bool(true) bool(true) bool(true) -bool(true) + +Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d +NULL bool(false) bool(false) -- Iteration 2 -- bool(true) bool(true) bool(true) -bool(true) + +Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d +NULL bool(false) bool(false) -- Iteration 3 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(false) -bool(false) + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL + +Warning: fnmatch() expects parameter 1 to be a valid path, string given in %s on line %d +NULL -- Iteration 4 -- bool(false) bool(false) bool(false) -bool(false) + +Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d +NULL bool(true) bool(false) -- Iteration 5 -- bool(false) bool(false) bool(false) -bool(false) + +Warning: fnmatch() expects parameter 2 to be a valid path, string given in %s on line %d +NULL bool(false) bool(true) diff --git a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt index e7c41c4a9d..14dd361e07 100644 --- a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt +++ b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt @@ -64,13 +64,17 @@ Warning: rmdir(%s/mkdir_variation2/): %s on line %d bool(false) *** Testing mkdir() and rmdir() for binary safe functionality *** -bool(true) -bool(true) + +Warning: mkdir() expects parameter 1 to be a valid path, string given in %s on line %d +bool(false) + +Warning: rmdir(%s): No such file or directory in %s on line %d +bool(false) *** Testing mkdir() with miscelleneous input *** bool(true) -Warning: mkdir(): Permission denied in %sfile/mkdir_rmdir_variation2.php on line %d +Warning: mkdir(): Permission denied in %s on line %d bool(false) bool(true) Done diff --git a/ext/standard/tests/file/readfile_variation10.phpt b/ext/standard/tests/file/readfile_variation10.phpt index a48150aee0fcf1240a7f47b7939c317043ae037f..2b48d4eed50172cc83a27e020d7094dd6562685c 100644 GIT binary patch delta 57 zcmeyxJDYFAJl4rySfxc070MEGGE)=^5=%046pBlVGV{_W%dn|TzQ$_FgDg2&l