1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00
Files
archived-php-src/ext/gettext/tests/bug53251.phpt
T
Nikita Popov 99a1bc0881 Skip two gettext tests under --repeat
gettext leaks global state across requests, so don't repeat these
tests. See also GH-6641.
2021-02-08 09:49:33 +01:00

25 lines
639 B
PHP

--TEST--
Bug #53251 (bindtextdomain with null dir doesn't return old value)
--SKIPIF--
<?php
if (!extension_loaded('gettext')) die('skip gettext extension not available');
if (getenv('SKIP_REPEAT')) die('skip gettext leaks global state across requests');
?>
--FILE--
<?php
var_dump(is_string(bindtextdomain('foo', null)));
$dir = bindtextdomain('foo', '.');
var_dump(bindtextdomain('foo', null) === $dir);
var_dump(bind_textdomain_codeset('foo', null));
var_dump(bind_textdomain_codeset('foo', 'UTF-8'));
var_dump(bind_textdomain_codeset('foo', null));
?>
--EXPECT--
bool(true)
bool(true)
bool(false)
string(5) "UTF-8"
string(5) "UTF-8"