diff options
author | Zoe Slattery <zoe@php.net> | 2009-06-18 07:29:09 +0000 |
---|---|---|
committer | Zoe Slattery <zoe@php.net> | 2009-06-18 07:29:09 +0000 |
commit | b928d971b5f4e87d130980ee7bd59814da0b2356 (patch) | |
tree | a7e9606d755a9cd62c3636cd87fac2ef48bf8952 /ext/gettext/tests/gettext_ngettext-wrongparams.phpt | |
parent | 269df474bf27b1543a11f48642b2e0750ce0968b (diff) | |
download | php-git-b928d971b5f4e87d130980ee7bd59814da0b2356.tar.gz |
Tests from Berlin test fest
Diffstat (limited to 'ext/gettext/tests/gettext_ngettext-wrongparams.phpt')
-rw-r--r-- | ext/gettext/tests/gettext_ngettext-wrongparams.phpt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ext/gettext/tests/gettext_ngettext-wrongparams.phpt b/ext/gettext/tests/gettext_ngettext-wrongparams.phpt new file mode 100644 index 0000000000..9003aefcfe --- /dev/null +++ b/ext/gettext/tests/gettext_ngettext-wrongparams.phpt @@ -0,0 +1,33 @@ +--TEST-- +Check how ngettext() with wrong parameters behaves. +--SKIPIF-- +<?php + if (!extension_loaded("gettext")) { + die("SKIP extension gettext not loaded\n"); + } + +?> +--FILE-- +<?php +ngettext(array(), "", 1); +ngettext("", array(), 1); +ngettext("", "", array()); +ngettext(); +ngettext(""); +ngettext("", ""); +?> +--EXPECTF-- +Warning: ngettext() expects parameter 1 to be string, array given in %s on line 2 + +Warning: ngettext() expects parameter 2 to be string, array given in %s on line 3 + +Warning: ngettext() expects parameter 3 to be long, array given in %s on line 4 + +Warning: ngettext() expects exactly 3 parameters, 0 given in %s on line 5 + +Warning: ngettext() expects exactly 3 parameters, 1 given in %s on line 6 + +Warning: ngettext() expects exactly 3 parameters, 2 given in %s on line 7 +--CREDITS-- +Tim Eggert, tim@elbart.com +PHP Testfest Berlin 2009-05-09 |