1--TEST-- 2Calling mb_convert_case() with an invalid casing mode 3--EXTENSIONS-- 4mbstring 5--FILE-- 6<?php 7 8var_dump(mb_convert_case('foo BAR Spaß', MB_CASE_UPPER)); 9var_dump(mb_convert_case('foo BAR Spaß', MB_CASE_LOWER)); 10var_dump(mb_convert_case('foo BAR Spaß', MB_CASE_TITLE)); 11var_dump(mb_convert_case('foo BAR Spaß', MB_CASE_FOLD)); 12var_dump(mb_convert_case('foo BAR Spaß', MB_CASE_UPPER_SIMPLE)); 13var_dump(mb_convert_case('foo BAR Spaß', MB_CASE_LOWER_SIMPLE)); 14var_dump(mb_convert_case('foo BAR Spaß', MB_CASE_TITLE_SIMPLE)); 15var_dump(mb_convert_case('foo BAR Spaß', MB_CASE_FOLD_SIMPLE)); 16 17// Invalid mode 18try { 19 var_dump(mb_convert_case('foo BAR Spaß', 100)); 20} catch (\ValueError $e) { 21 echo $e->getMessage() . \PHP_EOL; 22} 23 24?> 25--EXPECT-- 26string(13) "FOO BAR SPASS" 27string(13) "foo bar spaß" 28string(13) "Foo Bar Spaß" 29string(13) "foo bar spass" 30string(13) "FOO BAR SPAß" 31string(13) "foo bar spaß" 32string(13) "Foo Bar Spaß" 33string(13) "foo bar spaß" 34mb_convert_case(): Argument #2 ($mode) must be one of the MB_CASE_* constants 35