@@ -31,6 +31,14 @@ public function setUp(): void
31
31
$ this ->reflectionExtension = new EnumMethodsClassReflectionExtension ();
32
32
}
33
33
34
+ public function testGetName (): void
35
+ {
36
+ $ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
37
+ $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
38
+
39
+ $ this ->assertSame ('STR ' , $ methodReflection ->getName ());
40
+ }
41
+
34
42
public function testGetDeclaringClass (): void
35
43
{
36
44
$ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
@@ -63,6 +71,14 @@ public function testShouldBePublic(): void
63
71
$ this ->assertTrue ($ methodReflection ->isPublic ());
64
72
}
65
73
74
+ public function testGetPrototype (): void
75
+ {
76
+ $ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
77
+ $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
78
+
79
+ $ this ->assertSame ($ methodReflection , $ methodReflection ->getPrototype ());
80
+ }
81
+
66
82
public function testGetVariants (): void
67
83
{
68
84
$ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
@@ -107,4 +123,36 @@ public function testGetDeprecatedDescription(): void
107
123
$ this ->assertSame ('Test deprecated reflection ' , $ deprecatedRefl ->getDeprecatedDescription ());
108
124
$ this ->assertNull ($ notDeprecatedRefl ->getDeprecatedDescription ());
109
125
}
126
+
127
+ public function testIsFinal (): void
128
+ {
129
+ $ classReflection = $ this ->broker ->getClass (DeprecatedEnum::class);
130
+ $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
131
+
132
+ $ this ->assertTrue ($ methodReflection ->isFinal ()->no ());
133
+ }
134
+
135
+ public function testIsInternal (): void
136
+ {
137
+ $ classReflection = $ this ->broker ->getClass (DeprecatedEnum::class);
138
+ $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
139
+
140
+ $ this ->assertTrue ($ methodReflection ->isInternal ()->no ());
141
+ }
142
+
143
+ public function testGetThrowType (): void
144
+ {
145
+ $ classReflection = $ this ->broker ->getClass (DeprecatedEnum::class);
146
+ $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
147
+
148
+ $ this ->assertNull ($ methodReflection ->getThrowType ());
149
+ }
150
+
151
+ public function testHasSideEffects (): void
152
+ {
153
+ $ classReflection = $ this ->broker ->getClass (DeprecatedEnum::class);
154
+ $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
155
+
156
+ $ this ->assertTrue ($ methodReflection ->hasSideEffects ()->no ());
157
+ }
110
158
}
0 commit comments