Skip to content

Commit c164e6b

Browse files
committed
add test
1 parent 582514d commit c164e6b

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Zend/tests/bug18556.phpt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
--TEST--
2+
Bug #18556 (Setting locale to 'tr_TR' lowercases class names)
3+
--FILE--
4+
<?php
5+
$g_lang = 'tr_TR';
6+
putenv("LANG=$g_lang");
7+
setlocale(LC_ALL, $g_lang);
8+
9+
class InfoBlob {
10+
var $foo;
11+
function InfoBlob() {
12+
$this->foo = "Foo";
13+
}
14+
}
15+
16+
echo "Instantiating an infoBlob with a lowercase i\n";
17+
$foobar = new infoBlob();
18+
echo $foobar->foo;
19+
echo "\nInstantiating an InfoBlob with an uppercase I\n";
20+
$foobar = new InfoBlob();
21+
echo $foobar->foo;
22+
echo "\n";
23+
setlocale(LC_ALL, "tr_TR.utf8");
24+
foreach(get_declared_classes() as $class)
25+
{
26+
if(!class_exists($class))
27+
echo "$class No Longer Exists!\n";
28+
}
29+
echo "Done.\n";
30+
?>
31+
--EXPECT--
32+
Instantiating an infoBlob with a lowercase i
33+
Foo
34+
Instantiating an InfoBlob with an uppercase I
35+
Foo
36+
Done.

0 commit comments

Comments
 (0)