php-src/ext/intl/tests/resourcebundle_null_mandatory_args.phpt
Gustavo André dos Santos Lopes 92039fed22 Changed ResourceBundle constructor behavior
null is now accepted for two first (mandatory arguments).

Passing null as the package name causes NULL to be passed to ICU  and
the default ICU data to be loaded.

Passing null as the locale name causes the default locale to be used.
2012-05-24 13:50:59 +02:00

27 lines
614 B
PHP

--TEST--
IntlCalendar::setTime() basic test
--INI--
date.timezone=Atlantic/Azores
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
$r = new ResourceBundle('en_US', NULL);
$c = $r->get('calendar')->get('gregorian')->get('DateTimePatterns')->get(0);
var_dump($c);
ini_set('intl.default_locale', 'pt_PT');
$r = new ResourceBundle(NULL, NULL);
$c = $r->get('calendar')->get('gregorian')->get('DateTimePatterns')->get(0);
var_dump($c);
?>
==DONE==
--EXPECT--
string(14) "h:mm:ss a zzzz"
string(12) "H:mm:ss zzzz"
==DONE==