1--TEST--
2Test mb_encode_mimeheader() function : text encoding with no MIME name
3--EXTENSIONS--
4mbstring
5--SKIPIF--
6<?php
7function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
8?>
9--FILE--
10<?php
11try {
12    var_dump(mb_encode_mimeheader("abc", "UTF7-IMAP", "Q"));
13} catch (\ValueError $e) {
14    echo $e->getMessage() . \PHP_EOL;
15}
16
17echo "Done\n";
18?>
19--EXPECT--
20mb_encode_mimeheader(): Argument #2 ($charset) "UTF7-IMAP" cannot be used for MIME header encoding
21Done
22