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