diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-19 17:11:00 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-11 11:32:20 +0100 |
commit | 852485d8ecd784153e41e565a0a87abf99cf4e0d (patch) | |
tree | 3c8be88c2c98b5f1b2f9ea51e5d3a20c10baf3ff /ext/zlib/tests/gzdeflate_error1.phpt | |
parent | 6bfb119e18e5241b6719a4ad69223d91c465a58e (diff) | |
download | php-git-852485d8ecd784153e41e565a0a87abf99cf4e0d.tar.gz |
Adjust tests for zpp TypeError change
Diffstat (limited to 'ext/zlib/tests/gzdeflate_error1.phpt')
-rw-r--r-- | ext/zlib/tests/gzdeflate_error1.phpt | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/ext/zlib/tests/gzdeflate_error1.phpt b/ext/zlib/tests/gzdeflate_error1.phpt index 93f8c03b4c..af74d1c771 100644 --- a/ext/zlib/tests/gzdeflate_error1.phpt +++ b/ext/zlib/tests/gzdeflate_error1.phpt @@ -20,52 +20,22 @@ if (!extension_loaded("zlib")) { echo "*** Testing gzdeflate() : error conditions ***\n"; -// Zero arguments -echo "\n-- Testing gzdeflate() function with Zero arguments --\n"; -var_dump( gzdeflate() ); - -//Test gzdeflate with one more than the expected number of arguments -echo "\n-- Testing gzdeflate() function with more than expected no. of arguments --\n"; $data = 'string_val'; -$level = 2; -$encoding = ZLIB_ENCODING_RAW; -$extra_arg = 10; -var_dump( gzdeflate($data, $level, $encoding, $extra_arg) ); echo "\n-- Testing with incorrect compression level --\n"; $bad_level = 99; var_dump(gzdeflate($data, $bad_level)); echo "\n-- Testing with incorrect encoding --\n"; +$level = 2; $bad_encoding = 99; var_dump(gzdeflate($data, $level, $bad_encoding)); -class Tester { - function Hello() { - echo "Hello\n"; - } -} - -echo "\n-- Testing with incorrect parameters --\n"; -$testclass = new Tester(); -var_dump(gzdeflate($testclass)); -var_dump(gzdeflate($data, $testclass)); - ?> ===Done=== --EXPECTF-- *** Testing gzdeflate() : error conditions *** --- Testing gzdeflate() function with Zero arguments -- - -Warning: gzdeflate() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing gzdeflate() function with more than expected no. of arguments -- - -Warning: gzdeflate() expects at most 3 parameters, 4 given in %s on line %d -NULL - -- Testing with incorrect compression level -- Warning: gzdeflate(): compression level (99) must be within -1..9 in %s on line %d @@ -75,12 +45,4 @@ bool(false) Warning: gzdeflate(): encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE in %s on line %d bool(false) - --- Testing with incorrect parameters -- - -Warning: gzdeflate() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: gzdeflate() expects parameter 2 to be int, object given in %s on line %d -NULL ===Done=== |