Skip to content

Commit

Permalink
Add test for GH-11423
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Jun 14, 2023
1 parent 85a4a80 commit 96ea06a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions ext/zend_test/tests/gh11423.phpt
@@ -0,0 +1,29 @@
--TEST--
GH-11423 (internal constants have their namespace lowercased)
--EXTENSIONS--
zend_test
--FILE--
<?php

$re = new \ReflectionExtension('zend_test');
var_dump($re->getConstants());

define('NS1\ns2\Const1','value1');
var_dump(get_defined_constants(true)["user"]);

?>
--EXPECT--
array(4) {
["ZEND_TEST_DEPRECATED"]=>
int(42)
["ZEND_CONSTANT_A"]=>
string(6) "global"
["zendtestns2\ZEND_CONSTANT_A"]=>
string(10) "namespaced"
["zendtestns2\zendsubns\ZEND_CONSTANT_A"]=>
string(10) "namespaced"
}
array(1) {
["ns1\ns2\Const1"]=>
string(6) "value1"
}

0 comments on commit 96ea06a

Please sign in to comment.