1--TEST--
2IntlCalendar::add(): 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
11ini_set("intl.error_level", E_WARNING);
12
13$c = new IntlGregorianCalendar(NULL, 'pt_PT');
14
15var_dump($c->add(1, 2, 3));
16var_dump($c->add(-1, 2));
17var_dump($c->add(1));
18
19var_dump(intlcal_add($c, 1, 2, 3));
20var_dump(intlcal_add(1, 2, 3));
21--EXPECTF--
22
23Warning: IntlCalendar::add() expects exactly 2 parameters, 3 given in %s on line %d
24
25Warning: IntlCalendar::add(): intlcal_add: bad arguments in %s on line %d
26bool(false)
27
28Warning: IntlCalendar::add(): intlcal_add: invalid field in %s on line %d
29bool(false)
30
31Warning: IntlCalendar::add() expects exactly 2 parameters, 1 given in %s on line %d
32
33Warning: IntlCalendar::add(): intlcal_add: bad arguments in %s on line %d
34bool(false)
35
36Warning: intlcal_add() expects exactly 3 parameters, 4 given in %s on line %d
37
38Warning: intlcal_add(): intlcal_add: bad arguments in %s on line %d
39bool(false)
40
41Catchable fatal error: Argument 1 passed to intlcal_add() must be an instance of IntlCalendar, integer given in %s on line %d
42