summaryrefslogtreecommitdiff
path: root/ext/zlib/tests
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2015-04-12 23:49:16 -0700
committerStanislav Malyshev <stas@php.net>2015-04-12 23:49:16 -0700
commitba15e8dfd0bbe65fd7022f55cf5bdaca413d96e4 (patch)
treeb2dd8e35ab20929e2bbab13c119f5d3d208b80b3 /ext/zlib/tests
parented7d4977bb0e99153c67d2873488b8f572627c8a (diff)
parent45facd15fb1be704ee1ae374fa306dad8450edbd (diff)
downloadphp-git-ba15e8dfd0bbe65fd7022f55cf5bdaca413d96e4.tar.gz
Merge branch 'PHP-5.4.40' into PHP-5.5.24
* PHP-5.4.40: fix memory leak & add test Fix tests
Diffstat (limited to 'ext/zlib/tests')
-rw-r--r--ext/zlib/tests/gzopen_variation1.phpt28
-rw-r--r--ext/zlib/tests/readgzfile_variation1.phpt10
-rw-r--r--ext/zlib/tests/readgzfile_variation6.phpt4
3 files changed, 21 insertions, 21 deletions
diff --git a/ext/zlib/tests/gzopen_variation1.phpt b/ext/zlib/tests/gzopen_variation1.phpt
index c5a47f4d08..bca48f39c9 100644
--- a/ext/zlib/tests/gzopen_variation1.phpt
+++ b/ext/zlib/tests/gzopen_variation1.phpt
@@ -1,17 +1,17 @@
--TEST--
-Test gzopen() function : usage variation
+Test gzopen() function : usage variation
--SKIPIF--
-<?php
+<?php
if (!extension_loaded("zlib")) {
- print "skip - zlib extension not loaded";
-}
+ print "skip - zlib extension not loaded";
+}
?>
--FILE--
<?php
/* Prototype : resource gzopen(string filename, string mode [, int use_include_path])
- * Description: Open a .gz-file and return a .gz-file pointer
+ * Description: Open a .gz-file and return a .gz-file pointer
* Source code: ext/zlib/zlib.c
- * Alias to functions:
+ * Alias to functions:
*/
echo "*** Testing gzopen() : usage variation ***\n";
@@ -102,9 +102,9 @@ $inputs = array(
// unset data
'unset var' => @$unset_var,
-
+
// resource variable
- 'resource' => $fp
+ 'resource' => $fp
);
// loop through each element of the array for filename
@@ -158,19 +158,19 @@ Error: 2 - gzopen(0.5): failed to open stream: No such file or directory, %s(%d)
bool(false)
--empty array--
-Error: 2 - gzopen() expects parameter 1 to be string, array given, %s(%d)
+Error: 2 - gzopen() expects parameter 1 to be a valid path, array given, %s(%d)
NULL
--int indexed array--
-Error: 2 - gzopen() expects parameter 1 to be string, array given, %s(%d)
+Error: 2 - gzopen() expects parameter 1 to be a valid path, array given, %s(%d)
NULL
--associative array--
-Error: 2 - gzopen() expects parameter 1 to be string, array given, %s(%d)
+Error: 2 - gzopen() expects parameter 1 to be a valid path, array given, %s(%d)
NULL
--nested arrays--
-Error: 2 - gzopen() expects parameter 1 to be string, array given, %s(%d)
+Error: 2 - gzopen() expects parameter 1 to be a valid path, array given, %s(%d)
NULL
--uppercase NULL--
@@ -210,7 +210,7 @@ Error: 2 - gzopen(Class A object): failed to open stream: No such file or direct
bool(false)
--instance of classWithoutToString--
-Error: 2 - gzopen() expects parameter 1 to be string, object given, %s(%d)
+Error: 2 - gzopen() expects parameter 1 to be a valid path, object given, %s(%d)
NULL
--undefined var--
@@ -222,7 +222,7 @@ Error: 2 - gzopen(): Filename cannot be empty, %s(%d)
bool(false)
--resource--
-Error: 2 - gzopen() expects parameter 1 to be string, resource given, %s(%d)
+Error: 2 - gzopen() expects parameter 1 to be a valid path, resource given, %s(%d)
NULL
===DONE===
diff --git a/ext/zlib/tests/readgzfile_variation1.phpt b/ext/zlib/tests/readgzfile_variation1.phpt
index 5a5ec4f6e7..5d9b639d29 100644
--- a/ext/zlib/tests/readgzfile_variation1.phpt
+++ b/ext/zlib/tests/readgzfile_variation1.phpt
@@ -29,15 +29,15 @@ foreach ( $variation as $var ) {
===DONE===
--EXPECTF--
-Warning: readgzfile() expects parameter 1 to be string, array given in %s on line %d
+Warning: readgzfile() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-Warning: readgzfile() expects parameter 1 to be string, array given in %s on line %d
+Warning: readgzfile() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-Warning: readgzfile() expects parameter 1 to be string, array given in %s on line %d
+Warning: readgzfile() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-Warning: readgzfile() expects parameter 1 to be string, array given in %s on line %d
+Warning: readgzfile() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/zlib/tests/readgzfile_variation6.phpt b/ext/zlib/tests/readgzfile_variation6.phpt
index 702f91850e..9fcea02939 100644
--- a/ext/zlib/tests/readgzfile_variation6.phpt
+++ b/ext/zlib/tests/readgzfile_variation6.phpt
@@ -45,5 +45,5 @@ foreach ( $variation as $var ) {
--EXPECTF--
Error: 2 - readgzfile(Class A object): failed to open stream: No such file or directory, %s(%d)
bool(false)
-Error: 2 - readgzfile() expects parameter 1 to be string, object given, %s(%d)
-NULL \ No newline at end of file
+Error: 2 - readgzfile() expects parameter 1 to be a valid path, object given, %s(%d)
+NULL