1--TEST-- 2IntlCalendar::set(): bad arguments 3--INI-- 4date.timezone=Atlantic/Azores 5--EXTENSIONS-- 6intl 7--FILE-- 8<?php 9ini_set("intl.error_level", E_WARNING); 10 11$c = new IntlGregorianCalendar(NULL, 'pt_PT'); 12 13try { 14 $c->set(1, 2, 3, 4, 5, 6, 7); 15} catch (ArgumentCountError $exception) { 16 echo $exception->getMessage() . "\n"; 17} 18 19try { 20 $c->set(1, 2, 3, 4); 21} catch (ArgumentCountError $exception) { 22 echo $exception->getMessage() . "\n"; 23} 24 25try { 26 var_dump($c->set(-1, 2)); 27} catch (\ValueError $e) { 28 echo $e->getMessage() . \PHP_EOL; 29} 30 31try { 32 var_dump(intlcal_set($c, -1, 2)); 33} catch (\ValueError $e) { 34 echo $e->getMessage() . \PHP_EOL; 35} 36 37try { 38 var_dump(intlcal_set(1, 2, 3)); 39} catch (\TypeError $e) { 40 echo $e->getMessage() . \PHP_EOL; 41} 42?> 43--EXPECT-- 44IntlCalendar::set() expects at most 6 arguments, 7 given 45IntlCalendar::set() has no variant with exactly 4 parameters 46IntlCalendar::set(): Argument #1 ($year) must be a valid field 47intlcal_set(): Argument #2 ($year) must be a valid field 48intlcal_set(): Argument #1 ($calendar) must be of type IntlCalendar, int given 49