gettext_bindtextdomain-emptydomain.phpt 384 B

123456789101112131415161718192021
  1. --TEST--
  2. Test if bindtextdomain() errors if the domain is empty.
  3. --EXTENSIONS--
  4. gettext
  5. --FILE--
  6. <?php
  7. chdir(__DIR__);
  8. try {
  9. bindtextdomain('', 'foobar');
  10. } catch (ValueError $exception) {
  11. echo $exception->getMessage() . "\n";
  12. }
  13. ?>
  14. --EXPECT--
  15. bindtextdomain(): Argument #1 ($domain) cannot be empty
  16. --CREDITS--
  17. Till Klampaeckel, till@php.net
  18. PHP Testfest Berlin 2009-05-09