mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

This is a mix of more automated and manual migration. It should remove all applicable extension_loaded() checks outside of skipif.inc files.
26 lines
654 B
PHP
26 lines
654 B
PHP
--TEST--
|
|
Test mb_regex_encoding() function : error conditions - Pass an unknown encoding
|
|
--EXTENSIONS--
|
|
mbstring
|
|
--SKIPIF--
|
|
<?php
|
|
function_exists('mb_regex_encoding') or die("skip mb_regex_encoding() is not available in this build");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
/*
|
|
* Pass mb_regex_encoding an unknown type of encoding
|
|
*/
|
|
|
|
echo "*** Testing mb_regex_encoding() : error conditions ***\n";
|
|
|
|
try {
|
|
var_dump(mb_regex_encoding('unknown'));
|
|
} catch (\ValueError $e) {
|
|
echo $e->getMessage() . \PHP_EOL;
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
*** Testing mb_regex_encoding() : error conditions ***
|
|
mb_regex_encoding(): Argument #1 ($encoding) must be a valid encoding, "unknown" given
|