1--TEST--
2ReflectionParameter::getDefaultValueConstant() should raise exception on non optional parameter
3--FILE--
4<?php
5
6define("CONST_TEST_1", "const1");
7
8function ReflectionParameterTest($test, $test2 = CONST_TEST_1) {
9    echo $test;
10}
11$reflect = new ReflectionFunction('ReflectionParameterTest');
12foreach($reflect->getParameters() as $param) {
13    try {
14        echo $param->getDefaultValueConstantName() . "\n";
15    } catch(ReflectionException $e) {
16        echo $e->getMessage() . "\n";
17    }
18}
19?>
20--EXPECT--
21Internal error: Failed to retrieve the default value
22CONST_TEST_1
23