1--TEST--
2IntlCalendar::setFirstDayOfWeek(): bad arguments
3--INI--
4date.timezone=Atlantic/Azores
5--SKIPIF--
6<?php
7if (!extension_loaded('intl'))
8    die('skip intl extension not enabled');
9--FILE--
10<?php
11
12$c = new IntlGregorianCalendar(NULL, 'pt_PT');
13
14try {
15    var_dump($c->setFirstDayOfWeek(0));
16} catch (\ValueError $e) {
17    echo $e->getMessage() . \PHP_EOL;
18}
19
20try {
21    var_dump(intlcal_set_first_day_of_week($c, 0));
22} catch (\ValueError $e) {
23    echo $e->getMessage() . \PHP_EOL;
24}
25try {
26    var_dump(intlcal_set_first_day_of_week(1, 2));
27} catch (\TypeError $e) {
28    echo $e->getMessage() . \PHP_EOL;
29}
30
31?>
32--EXPECT--
33IntlCalendar::setFirstDayOfWeek(): Argument #1 ($dayOfWeek) must be a valid day of the week
34intlcal_set_first_day_of_week(): Argument #2 ($dayOfWeek) must be a valid day of the week
35intlcal_set_first_day_of_week(): Argument #1 ($calendar) must be of type IntlCalendar, int given
36