diff options
Diffstat (limited to 'ext/intl/tests/calendar_getDayOfWeekType_basic.phpt')
-rw-r--r-- | ext/intl/tests/calendar_getDayOfWeekType_basic.phpt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/intl/tests/calendar_getDayOfWeekType_basic.phpt b/ext/intl/tests/calendar_getDayOfWeekType_basic.phpt new file mode 100644 index 0000000000..d5319f1471 --- /dev/null +++ b/ext/intl/tests/calendar_getDayOfWeekType_basic.phpt @@ -0,0 +1,34 @@ +--TEST-- +IntlCalendar::getDayOfWeekType() basic test +--INI-- +date.timezone=Atlantic/Azores +--SKIPIF-- +<?php +if (!extension_loaded('intl')) + die('skip intl extension not enabled'); +if (version_compare(INTL_ICU_VERSION, '4.4') < 0) + die('skip for ICU 4.4+'); +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); +ini_set("intl.default_locale", "nl"); + +$intlcal = IntlCalendar::createInstance('UTC'); +$intlcal->setTime(strtotime('2012-02-29 00:00:00 +0000') * 1000); +var_dump( + intlcal_get_day_of_week_type($intlcal, IntlCalendar::DOW_SUNDAY), + $intlcal->getDayOfWeekType(IntlCalendar::DOW_MONDAY), + $intlcal->getDayOfWeekType(IntlCalendar::DOW_TUESDAY), + $intlcal->getDayOfWeekType(IntlCalendar::DOW_FRIDAY), + $intlcal->getDayOfWeekType(IntlCalendar::DOW_SATURDAY) +); + +?> +==DONE== +--EXPECT-- +int(3) +int(0) +int(0) +int(0) +int(1) +==DONE==
\ No newline at end of file |