Skip to content

Commit c12c3c9

Browse files
committed
Test rt consts
1 parent de88992 commit c12c3c9

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

ext/reflection/tests/ReflectionConstant_getName.phpt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ var_dump($reflectionConstant->getName());
1111
$reflectionConstant = new ReflectionConstant('ZEND_TEST_DEPRECATED');
1212
var_dump($reflectionConstant->getName());
1313

14+
define('RT_CONST', 42);
15+
$reflectionConstant = new ReflectionConstant('RT_CONST');
16+
var_dump($reflectionConstant->getName());
17+
1418
?>
1519
--EXPECT--
1620
string(15) "ZEND_CONSTANT_A"
1721
string(20) "ZEND_TEST_DEPRECATED"
22+
string(8) "RT_CONST"

ext/reflection/tests/ReflectionConstant_getValue.phpt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ var_dump($reflectionConstant->getValue());
1111
$reflectionConstant = new ReflectionConstant('ZEND_TEST_DEPRECATED');
1212
var_dump($reflectionConstant->getValue());
1313

14+
define('RT_CONST', 42);
15+
$reflectionConstant = new ReflectionConstant('RT_CONST');
16+
var_dump($reflectionConstant->getValue());
17+
1418
?>
1519
--EXPECT--
1620
string(6) "global"
1721
int(42)
22+
int(42)

ext/reflection/tests/ReflectionConstant_isDeprecated.phpt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ var_dump($reflectionConstant->isDeprecated());
1111
$reflectionConstant = new ReflectionConstant('ZEND_TEST_DEPRECATED');
1212
var_dump($reflectionConstant->isDeprecated());
1313

14+
define('RT_CONST', 42);
15+
$reflectionConstant = new ReflectionConstant('RT_CONST');
16+
var_dump($reflectionConstant->isDeprecated());
17+
1418
?>
1519
--EXPECT--
1620
bool(false)
1721
bool(true)
22+
bool(false)

0 commit comments

Comments
 (0)