php-src/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt
Gina Peter Banyard c42e6d62d8
ext/intl: modernize tests (#19392)
This is effectively removing ZPP tests, enabling warnings, and moving INI settings into the INI PHPT block
2025-08-06 23:33:48 +01:00

25 lines
594 B
PHP

--TEST--
IntlCalendar::setMinimalDaysInFirstWeek(): bad arguments
--EXTENSIONS--
intl
--FILE--
<?php
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
try {
var_dump($c->setMinimalDaysInFirstWeek(0));
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
try {
var_dump(intlcal_set_minimal_days_in_first_week($c, 0));
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECT--
IntlCalendar::setMinimalDaysInFirstWeek(): Argument #1 ($days) must be between 1 and 7
intlcal_set_minimal_days_in_first_week(): Argument #2 ($days) must be between 1 and 7