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

IntlTimeZone::createTimeZoneIDEnumeration And convert those to ValueErrors directly as they are bugs
16 lines
450 B
PHP
16 lines
450 B
PHP
--TEST--
|
|
IntlTimeZone::createTimeZoneIDEnumeration() invalid zone type
|
|
--EXTENSIONS--
|
|
intl
|
|
--FILE--
|
|
<?php
|
|
|
|
try {
|
|
var_dump(IntlTimeZone::createTimeZoneIDEnumeration(-1));
|
|
} catch (Throwable $e) {
|
|
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
ValueError: IntlTimeZone::createTimeZoneIDEnumeration(): Argument #1 ($type) must be one of IntlTimeZone::TYPE_ANY, IntlTimeZone::TYPE_CANONICAL, or IntlTimeZone::TYPE_CANONICAL_LOCATION
|