1--TEST--
2IntlCalendar::setMinimalDaysInFirstWeek(): bad arguments
3--INI--
4date.timezone=Atlantic/Azores
5--EXTENSIONS--
6intl
7--FILE--
8<?php
9
10$c = new IntlGregorianCalendar(NULL, 'pt_PT');
11
12try {
13    var_dump($c->setMinimalDaysInFirstWeek(0));
14} catch (\ValueError $e) {
15    echo $e->getMessage() . \PHP_EOL;
16}
17
18try {
19    var_dump(intlcal_set_minimal_days_in_first_week($c, 0));
20} catch (\ValueError $e) {
21    echo $e->getMessage() . \PHP_EOL;
22}
23try {
24    var_dump(intlcal_set_minimal_days_in_first_week(1, 2));
25} catch (\TypeError $e) {
26    echo $e->getMessage() . \PHP_EOL;
27}
28
29?>
30--EXPECT--
31IntlCalendar::setMinimalDaysInFirstWeek(): Argument #1 ($days) must be between 1 and 7
32intlcal_set_minimal_days_in_first_week(): Argument #2 ($days) must be between 1 and 7
33intlcal_set_minimal_days_in_first_week(): Argument #1 ($calendar) must be of type IntlCalendar, int given
34