diff --git a/ext/iconv/tests/iconv_mime_encode_001.phpt b/ext/iconv/tests/iconv_mime_encode_001.phpt new file mode 100644 index 0000000000000..f4d9469eeaaae --- /dev/null +++ b/ext/iconv/tests/iconv_mime_encode_001.phpt @@ -0,0 +1,33 @@ +--TEST-- +iconv_mime_encode(): Encoding parameter exceeds the maximum allowed for preference "input-charset" and "output-charset" +--EXTENSIONS-- +iconv +--INI-- +iconv.internal_charset=iso-8859-1 +--FILE-- + "ISO-8859-1".$extra, + "output-charset" => "UTF-8", + "line-length" => 76, + "line-break-chars" => "\n", + "scheme" => "B" +]; + +$result = iconv_mime_encode("Subject", "Prüfung", $preferences); +var_dump($result); + +$preferences["input-charset"] = "ISO-8859-1"; +$preferences["output-charset"] = "UTF-8".$extra; + +$result = iconv_mime_encode("Subject", "Prüfung", $preferences); +var_dump($result); +?> +--EXPECTF-- +Warning: iconv_mime_encode(): Encoding parameter exceeds the maximum allowed length of %d characters in %s on line %d +bool(false) + +Warning: iconv_mime_encode(): Encoding parameter exceeds the maximum allowed length of %d characters in %s on line %d +bool(false)