1--TEST-- 2Test incremental inflate_add() error functionality 3--EXTENSIONS-- 4zlib 5--FILE-- 6<?php 7 8$badResource = fopen("php://memory", "r+"); 9try { 10 var_dump(inflate_add($badResource, "test")); 11} catch (\TypeError $e) { 12 echo $e->getMessage() . \PHP_EOL; 13} 14 15$resource = inflate_init(ZLIB_ENCODING_DEFLATE); 16$badFlushType = 6789; 17try { 18 var_dump(inflate_add($resource, "test", $badFlushType)); 19} catch (\ValueError $e) { 20 echo $e->getMessage() . \PHP_EOL; 21} 22 23?> 24--EXPECT-- 25inflate_add(): Argument #1 ($context) must be of type InflateContext, resource given 26inflate_add(): Argument #3 ($flush_mode) must be one of ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK, or ZLIB_FINISH 27