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