55namespace Timeweb \Tests \PHPStan \Reflection ;
66
77use PHPStan \Reflection \ParametersAcceptorSelector ;
8- use PHPStan \Testing \TestCase ;
8+ use PHPStan \Testing \PHPStanTestCase ;
99use PHPStan \Type \VerbosityLevel ;
1010use Timeweb \PHPStan \Reflection \EnumMethodReflection ;
1111use Timeweb \PHPStan \Reflection \EnumMethodsClassReflectionExtension ;
1414/**
1515 * @coversDefaultClass \Timeweb\PHPStan\Reflection\EnumMethodsClassReflectionExtension
1616 */
17- class EnumMethodsClassReflectionExtensionTest extends TestCase
17+ class EnumMethodsClassReflectionExtensionTest extends PHPStanTestCase
1818{
1919 /**
20- * @var \PHPStan\Broker\Broker
20+ * @var \PHPStan\Reflection\ReflectionProvider
2121 */
22- protected $ broker ;
22+ protected $ reflectionProvider ;
2323
2424 /**
2525 * @var EnumMethodsClassReflectionExtension
@@ -28,7 +28,7 @@ class EnumMethodsClassReflectionExtensionTest extends TestCase
2828
2929 public function setUp (): void
3030 {
31- $ this ->broker = $ this ->createBroker ();
31+ $ this ->reflectionProvider = $ this ->createReflectionProvider ();
3232 $ this ->reflectionExtension = new EnumMethodsClassReflectionExtension ();
3333 }
3434
@@ -38,7 +38,7 @@ public function setUp(): void
3838 */
3939 public function testEnumMethodsCanBeFoundInEnumSubclasses (bool $ expected , string $ methodName ): void
4040 {
41- $ classReflection = $ this ->broker ->getClass (EnumFixture::class);
41+ $ classReflection = $ this ->reflectionProvider ->getClass (EnumFixture::class);
4242 $ hasMethod = $ this ->reflectionExtension ->hasMethod ($ classReflection , $ methodName );
4343
4444 $ this ->assertEquals ($ expected , $ hasMethod );
@@ -60,7 +60,7 @@ public function methodNameDataProvider(): array
6060 */
6161 public function testEnumMethodsCannotBeFoundInNonEnumSubclasses (): void
6262 {
63- $ classReflection = $ this ->broker ->getClass (EnumFixture::class);
63+ $ classReflection = $ this ->reflectionProvider ->getClass (EnumFixture::class);
6464 $ hasMethod = $ this ->reflectionExtension ->hasMethod ($ classReflection , 'SOME_NAME ' );
6565
6666 $ this ->assertFalse ($ hasMethod );
@@ -72,7 +72,7 @@ public function testEnumMethodsCannotBeFoundInNonEnumSubclasses(): void
7272 */
7373 public function testEnumMethodReflectionCanBeObtained (): void
7474 {
75- $ classReflection = $ this ->broker ->getClass (EnumFixture::class);
75+ $ classReflection = $ this ->reflectionProvider ->getClass (EnumFixture::class);
7676 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'SOME_NAME ' );
7777
7878 $ this ->assertInstanceOf (EnumMethodReflection::class, $ methodReflection );
@@ -91,7 +91,7 @@ public function testEnumMethodReflectionCanBeObtained(): void
9191 */
9292 public function testEnumMethodProperties (string $ propertyName ): void
9393 {
94- $ classReflection = $ this ->broker ->getClass (EnumFixture::class);
94+ $ classReflection = $ this ->reflectionProvider ->getClass (EnumFixture::class);
9595 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , $ propertyName );
9696 $ parametersAcceptor = ParametersAcceptorSelector::selectSingle ($ methodReflection ->getVariants ());
9797
0 commit comments