php-src/ext/gettext/tests/gettext_textdomain-wrongparams.phpt
2009-06-18 07:25:55 +00:00

31 lines
792 B
PHP

--TEST--
Check how textdomain() with wrong parameters behaves.
--SKIPIF--
<?php
if (!extension_loaded("gettext")) {
die("skip\n");
}
if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
die("skip en_US.UTF-8 locale not supported.");
}
?>
--FILE--
<?php
// Using deprectated setlocale() in PHP6. The test needs to be changed
// when there is an alternative available.
chdir(dirname(__FILE__));
setlocale(LC_ALL, 'en_US.UTF-8');
bindtextdomain ("messages", "./locale");
textdomain (array());
?>
--EXPECTF--
Deprecated: setlocale(): deprecated in Unicode mode, please use ICU locale functions in %s.php on line %d
Warning: textdomain() expects parameter 1 to be %binary_string_optional%, array given in %s on line %d
--CREDITS--
Christian Weiske, cweiske@php.net
PHP Testfest Berlin 2009-05-09