mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
c5401854fc
This should fix most of the remaining issues with tabs and spaces being mixed in tests.
29 lines
613 B
PHP
29 lines
613 B
PHP
--TEST--
|
|
IntlCalendar::isSet(): bad arguments
|
|
--INI--
|
|
date.timezone=Atlantic/Azores
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('intl'))
|
|
die('skip intl extension not enabled');
|
|
--FILE--
|
|
<?php
|
|
|
|
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
|
|
|
|
try {
|
|
var_dump($c->isSet(-1));
|
|
} catch (\ValueError $e) {
|
|
echo $e->getMessage() . \PHP_EOL;
|
|
}
|
|
|
|
try {
|
|
var_dump(intlcal_is_set(1, 2));
|
|
} catch (\TypeError $e) {
|
|
echo $e->getMessage() . \PHP_EOL;
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
IntlCalendar::isSet(): Argument #1 ($field) must be a valid field
|
|
intlcal_is_set(): Argument #1 ($calendar) must be of type IntlCalendar, int given
|