1--TEST-- 2Test if bindtextdomain() returns string id if no directory path is set(if directory path is 'null') 3--EXTENSIONS-- 4gettext 5--SKIPIF-- 6<?php 7 8if (!setlocale(LC_ALL, 'en_US.UTF-8')) { 9 die("skip en_US.UTF-8 locale not supported."); 10} 11if (getenv('SKIP_REPEAT')) { 12 die('skip gettext leaks global state across requests'); 13} 14?> 15--FILE-- 16<?php 17$base_dir = __DIR__; 18chdir($base_dir); 19putenv('LC_ALL=en_US.UTF-8'); 20setlocale(LC_ALL, 'en_US.UTF-8'); 21bindtextdomain('messages',null); 22var_dump(gettext('Basic test')); 23bindtextdomain('messages', './locale'); 24var_dump(gettext('Basic test')); 25 26?> 27--EXPECT-- 28string(10) "Basic test" 29string(12) "A basic test" 30--CREDITS-- 31Moritz Neuhaeuser, info@xcompile.net 32PHP Testfest Berlin 2009-05-09 33