11<?php declare (strict_types=1 );
22
3- namespace MabeEnum \PHPStan \UnitTest ;
3+ namespace MabeEnum \PHPStan \tests \ unit ;
44
55use MabeEnumPHPStan \EnumMethodReflection ;
66use MabeEnumPHPStan \EnumMethodsClassReflectionExtension ;
77use MabeEnum \PHPStan \tests \assets \NotAnEnum ;
88use MabeEnum \PHPStan \tests \assets \VisibilityEnum ;
9- use PHPStan \Reflection \ParametersAcceptorSelector ;
109use PHPStan \Testing \TestCase ;
11- use PHPStan \Type \VerbosityLevel ;
1210
1311class EnumMethodsClassReflectionExtensionTest extends TestCase
1412{
@@ -20,41 +18,41 @@ class EnumMethodsClassReflectionExtensionTest extends TestCase
2018 /**
2119 * @var EnumMethodsClassReflectionExtension
2220 */
23- protected $ reflectionExtension ;
21+ protected $ extension ;
2422
2523 public function setUp (): void
2624 {
2725 $ this ->broker = $ this ->createBroker ();
28- $ this ->reflectionExtension = new EnumMethodsClassReflectionExtension ();
26+ $ this ->extension = new EnumMethodsClassReflectionExtension ();
2927 }
3028
3129 public function testHasMethodSuccess (): void
3230 {
3331 $ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
3432
3533 foreach (array_keys (VisibilityEnum::getConstants ()) as $ name ) {
36- $ this ->assertTrue ($ this ->reflectionExtension ->hasMethod ($ classReflection , $ name ));
34+ $ this ->assertTrue ($ this ->extension ->hasMethod ($ classReflection , $ name ));
3735 }
3836 }
3937
4038 public function testHasMethodUnknownNotFound (): void
4139 {
4240 $ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
43- $ this ->assertFalse ($ this ->reflectionExtension ->hasMethod ($ classReflection , 'UNKNOWN ' ));
41+ $ this ->assertFalse ($ this ->extension ->hasMethod ($ classReflection , 'UNKNOWN ' ));
4442 }
4543
4644 public function testHasMethodNotSubclassOfEnumNotFound (): void
4745 {
4846 $ classReflection = $ this ->broker ->getClass (NotAnEnum::class);
49- $ this ->assertFalse ($ this ->reflectionExtension ->hasMethod ($ classReflection , 'STR ' ));
47+ $ this ->assertFalse ($ this ->extension ->hasMethod ($ classReflection , 'STR ' ));
5048 }
5149
5250 public function testGetMethodSuccess (): void
5351 {
5452 $ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
5553
5654 foreach (array_keys (VisibilityEnum::getConstants ()) as $ name ) {
57- $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , $ name );
55+ $ methodReflection = $ this ->extension ->getMethod ($ classReflection , $ name );
5856
5957 $ this ->assertInstanceOf (EnumMethodReflection::class, $ methodReflection );
6058 $ this ->assertSame ($ classReflection , $ methodReflection ->getDeclaringClass ());
0 commit comments