summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/ReflectionClassConstant_toString_error.phpt
blob: cd4dfa3765c871d995a6a0c7f4076bf5ee149a4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--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'