@@ -17,26 +17,38 @@ Assert::exception(function () {
17
17
Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'a ' ));
18
18
}, ReflectionException::class);
19
19
20
- Assert::same (NS \Foo:: DEFINED , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'b ' )));
20
+ Assert::same (' abc ' , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'b ' )));
21
21
22
- Assert::same (NS \Foo:: DEFINED , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'c ' )));
22
+ Assert::same (' abc ' , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'c ' )));
23
23
24
- Assert::same (NS \Foo:: DEFINED , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'd ' )));
24
+ Assert::same (' abc ' , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'd ' )));
25
25
26
- Assert::same (NS \Bar::DEFINED , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'e ' )));
26
+ Assert::same ('abc ' , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'e ' )));
27
+
28
+ Assert::same ('abc ' , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'f ' )));
29
+
30
+ Assert::same ('abc ' , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'g ' )));
31
+
32
+ Assert::same ('abc ' , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'h ' )));
33
+
34
+ Assert::exception (function () {
35
+ Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'i ' ));
36
+ }, ReflectionException::class, 'Unable to resolve constant self::UNDEFINED used as default value of $i in NS\Foo::method(). ' );
27
37
28
38
Assert::exception (function () {
29
- Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'f ' ));
30
- }, ReflectionException::class, 'Unable to resolve constant self::UNDEFINED used as default value of $f in NS\Foo::method(). ' );
39
+ Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'j ' ));
40
+ }, ReflectionException::class, 'Unable to resolve constant NS \\Foo::UNDEFINED used as default value of $j in NS\Foo::method(). ' );
41
+
42
+ Assert::same (NS \Bar::DEFINED , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'k ' )));
31
43
32
44
Assert::exception (function () {
33
- Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'g ' ));
34
- }, ReflectionException::class, 'Unable to resolve constant NS\Undefined::ANY used as default value of $g in NS\Foo::method(). ' );
45
+ Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'l ' ));
46
+ }, ReflectionException::class, 'Unable to resolve constant NS\Undefined::ANY used as default value of $l in NS\Foo::method(). ' );
35
47
36
- Assert::same (DEFINED , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'h ' )));
48
+ Assert::same (DEFINED , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'm ' )));
37
49
38
50
Assert::exception (function () {
39
- Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'i ' ));
40
- }, ReflectionException::class, 'Unable to resolve constant NS\UNDEFINED used as default value of $i in NS\Foo::method(). ' );
51
+ Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'n ' ));
52
+ }, ReflectionException::class, 'Unable to resolve constant NS\UNDEFINED used as default value of $n in NS\Foo::method(). ' );
41
53
42
- Assert::same (NS \NS_DEFINED , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'j ' )));
54
+ Assert::same (NS \NS_DEFINED , Reflection::getParameterDefaultValue (new ReflectionParameter (['NS\Foo ' , 'method ' ], 'o ' )));
0 commit comments