1--TEST--
2Test mb_internal_encoding() function : error conditions - pass an unknown encoding
3--EXTENSIONS--
4mbstring
5--FILE--
6<?php
7/*
8 * Pass mb_internal_encoding an unknown encoding
9 */
10
11echo "*** Testing mb_internal_encoding() : error conditions ***\n";
12
13try {
14    var_dump(mb_internal_encoding('unknown-encoding'));
15} catch (\ValueError $e) {
16    echo $e->getMessage() . \PHP_EOL;
17}
18
19?>
20--EXPECT--
21*** Testing mb_internal_encoding() : error conditions ***
22mb_internal_encoding(): Argument #1 ($encoding) must be a valid encoding, "unknown-encoding" given
23