This repository was archived by the owner on Jan 29, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 11
11
12
12
use Zend \Code \Generator \ParameterGenerator ;
13
13
use Zend \Code \Generator \ValueGenerator ;
14
+ use Zend \Code \Reflection \MethodReflection ;
14
15
use Zend \Code \Reflection \ParameterReflection ;
16
+ use ZendTest \Code \Generator \TestAsset \ParameterClass ;
15
17
use ZendTest \Code \TestAsset \ClassTypeHintedClass ;
16
18
use ZendTest \Code \TestAsset \DocBlockOnlyHintsClass ;
17
19
use ZendTest \Code \TestAsset \InternalHintsClass ;
@@ -98,17 +100,18 @@ public function testFromReflectionGetDefaultValue()
98
100
$ this ->assertEquals ('\'foo \'' , (string ) $ defaultValue );
99
101
}
100
102
103
+ /**
104
+ * @group 95
105
+ */
101
106
public function testFromReflectionGetDefaultValueNotOptional ()
102
107
{
103
- $ reflectionClass = new \Zend \Code \Reflection \ClassReflection (
104
- 'ZendTest\Code\Generator\TestAsset\ParameterClass '
105
- );
106
- $ method = $ reflectionClass ->getMethod ('defaultObjectEqualsNullAndNotOptional ' );
108
+ $ method = new MethodReflection (ParameterClass::class, 'defaultObjectEqualsNullAndNotOptional ' );
107
109
108
110
$ params = $ method ->getParameters ();
111
+
109
112
$ this ->assertCount (2 , $ params );
110
113
111
- $ firstParameter = $ codeGenParam = ParameterGenerator::fromReflection ($ params [0 ]);
114
+ $ firstParameter = ParameterGenerator::fromReflection ($ params [0 ]);
112
115
$ this ->assertInstanceOf (ValueGenerator::class, $ firstParameter ->getDefaultValue ());
113
116
$ this ->assertNull ($ firstParameter ->getDefaultValue ()->getSourceContent ());
114
117
}
You can’t perform that action at this time.
0 commit comments