php-src/ext/intl/tests/calendar_isSet_error.phpt
Nikita Popov c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00

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