Skip to content

Commit 96ea06a

Browse files
committed
Add test for GH-11423
1 parent 85a4a80 commit 96ea06a

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

ext/zend_test/tests/gh11423.phpt

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
--TEST--
2+
GH-11423 (internal constants have their namespace lowercased)
3+
--EXTENSIONS--
4+
zend_test
5+
--FILE--
6+
<?php
7+
8+
$re = new \ReflectionExtension('zend_test');
9+
var_dump($re->getConstants());
10+
11+
define('NS1\ns2\Const1','value1');
12+
var_dump(get_defined_constants(true)["user"]);
13+
14+
?>
15+
--EXPECT--
16+
array(4) {
17+
["ZEND_TEST_DEPRECATED"]=>
18+
int(42)
19+
["ZEND_CONSTANT_A"]=>
20+
string(6) "global"
21+
["zendtestns2\ZEND_CONSTANT_A"]=>
22+
string(10) "namespaced"
23+
["zendtestns2\zendsubns\ZEND_CONSTANT_A"]=>
24+
string(10) "namespaced"
25+
}
26+
array(1) {
27+
["ns1\ns2\Const1"]=>
28+
string(6) "value1"
29+
}

0 commit comments

Comments
 (0)