1--TEST--
2IntlCalendar::setFirstDayOfWeek(): 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->setFirstDayOfWeek(0));
14} catch (\ValueError $e) {
15    echo $e->getMessage() . \PHP_EOL;
16}
17
18try {
19    var_dump(intlcal_set_first_day_of_week($c, 0));
20} catch (\ValueError $e) {
21    echo $e->getMessage() . \PHP_EOL;
22}
23try {
24    var_dump(intlcal_set_first_day_of_week(1, 2));
25} catch (\TypeError $e) {
26    echo $e->getMessage() . \PHP_EOL;
27}
28
29?>
30--EXPECT--
31IntlCalendar::setFirstDayOfWeek(): Argument #1 ($dayOfWeek) must be a valid day of the week
32intlcal_set_first_day_of_week(): Argument #2 ($dayOfWeek) must be a valid day of the week
33intlcal_set_first_day_of_week(): Argument #1 ($calendar) must be of type IntlCalendar, int given
34