php-src/ext/reflection/tests/ReflectionClassConstant_toString_error.phpt

18 lines
301 B
PHP

--TEST--
Exception thrown while converting ReflectionClassConstant to string
--FILE--
<?php
class B {
const X = self::UNKNOWN;
}
try {
echo new ReflectionClassConstant('B', 'X');
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Undefined class constant 'self::UNKNOWN'