1--TEST-- 2IntlCalendar::getWeekendTransition(): bad arguments 3--INI-- 4date.timezone=Atlantic/Azores 5--SKIPIF-- 6<?php 7if (!extension_loaded('intl')) 8 die('skip intl extension not enabled'); 9if (version_compare(INTL_ICU_VERSION, '4.4') < 0) 10 die('skip for ICU 4.4+'); 11--FILE-- 12<?php 13ini_set("intl.error_level", E_WARNING); 14 15$c = new IntlGregorianCalendar(NULL, 'pt_PT'); 16 17var_dump($c->getWeekendTransition()); 18var_dump($c->getWeekendTransition(1, 2)); 19var_dump($c->getWeekendTransition(0)); 20 21var_dump(intlcal_get_weekend_transition($c)); 22var_dump(intlcal_get_weekend_transition(1, 1)); 23--EXPECTF-- 24Warning: IntlCalendar::getWeekendTransition() expects exactly 1 parameter, 0 given in %s on line %d 25 26Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: bad arguments in %s on line %d 27bool(false) 28 29Warning: IntlCalendar::getWeekendTransition() expects exactly 1 parameter, 2 given in %s on line %d 30 31Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: bad arguments in %s on line %d 32bool(false) 33 34Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: invalid day of week in %s on line %d 35bool(false) 36 37Warning: intlcal_get_weekend_transition() expects exactly 2 parameters, 1 given in %s on line %d 38 39Warning: intlcal_get_weekend_transition(): intlcal_get_weekend_transition: bad arguments in %s on line %d 40bool(false) 41 42Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_weekend_transition() must be an instance of IntlCalendar, int given in %s:%d 43Stack trace: 44#0 %s(%d): intlcal_get_weekend_transition(1, 1) 45#1 {main} 46 thrown in %s on line %d 47