1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 06:21:12 +02:00
Files
archived-php-src/ext/intl/tests/calendar_getWeekendTransition_error.phpt
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

29 lines
672 B
PHP

--TEST--
IntlCalendar::getWeekendTransition(): bad arguments
--INI--
date.timezone=Atlantic/Azores
--EXTENSIONS--
intl
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
try {
var_dump($c->getWeekendTransition(0));
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
try {
var_dump(intlcal_get_weekend_transition(1, 1));
} catch (\TypeError $e) {
echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECT--
IntlCalendar::getWeekendTransition(): Argument #1 ($dayOfWeek) must be a valid day of the week
intlcal_get_weekend_transition(): Argument #1 ($calendar) must be of type IntlCalendar, int given