From 021c77bbc92c5d25fd698cc0d716a6ca01aaf917 Mon Sep 17 00:00:00 2001 From: Ivan Sidorov Date: Thu, 12 Sep 2024 04:41:09 +0000 Subject: [PATCH] Part 7. Success regression tests with UndefinedMixinClass --- tests/MixinAnnotationTest.php | 9 ++ tests/MixinsDeepTest.php | 151 ++++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) diff --git a/tests/MixinAnnotationTest.php b/tests/MixinAnnotationTest.php index 3c0c11b26bb..41a03937f49 100644 --- a/tests/MixinAnnotationTest.php +++ b/tests/MixinAnnotationTest.php @@ -603,12 +603,14 @@ public function providerInvalidCodeParse(): iterable { return [ 'undefinedMixinClass' => [ + // Similar test in MixinsDeepTest.php 'code' => ' 'UndefinedDocblockClass', ], 'undefinedMixinClassWithPropertyFetch' => [ + // Similar test in MixinsDeepTest.php 'code' => ' 'UndefinedPropertyFetch', ], 'undefinedMixinClassWithPropertyFetch_WithMagicMethod' => [ + // Similar test in MixinsDeepTest.php 'code' => ' 'UndefinedMagicPropertyFetch', ], 'undefinedMixinClassWithPropertyAssignment' => [ + // Similar test in MixinsDeepTest.php 'code' => ' 'UndefinedPropertyAssignment', ], 'undefinedMixinClassWithPropertyAssignment_WithMagicMethod' => [ + // Similar test in MixinsDeepTest.php 'code' => ' 'UndefinedMagicPropertyAssignment', ], 'undefinedMixinClassWithMethodCall' => [ + // Similar test in MixinsDeepTest.php 'code' => ' 'UndefinedMethod', ], 'undefinedMixinClassWithMethodCall_WithMagicMethod' => [ + // Similar test in MixinsDeepTest.php 'code' => ' 'UndefinedMagicMethod', ], 'undefinedMixinClassWithStaticMethodCall' => [ + // Similar test in MixinsDeepTest.php 'code' => ' 'UndefinedMethod', ], 'undefinedMixinClassWithStaticMethodCall_WithMagicMethod' => [ + // Similar test in MixinsDeepTest.php 'code' => ' [ + // Similar test in MixinAnnotationTest.php + 'code' => ' 'UndefinedDocblockClass', + ], + 'undefinedMixinClassWithPropertyFetch' => [ + // Similar test in MixinAnnotationTest.php + 'code' => 'foo;', + 'error_message' => 'UndefinedPropertyFetch', + ], + 'undefinedMixinClassWithPropertyFetch_WithMagicMethod' => [ + // Similar test in MixinAnnotationTest.php + 'code' => 'foo;', + 'error_message' => 'UndefinedMagicPropertyFetch', + ], + 'undefinedMixinClassWithPropertyAssignment' => [ + // Similar test in MixinAnnotationTest.php + 'code' => 'foo = "bar";', + 'error_message' => 'UndefinedPropertyAssignment', + ], + 'undefinedMixinClassWithPropertyAssignment_WithMagicMethod' => [ + // Similar test in MixinAnnotationTest.php + 'code' => 'foo = "bar";', + 'error_message' => 'UndefinedMagicPropertyAssignment', + ], + 'undefinedMixinClassWithMethodCall' => [ + // Similar test in MixinAnnotationTest.php + 'code' => 'foo();', + 'error_message' => 'UndefinedMethod', + ], + 'undefinedMixinClassWithMethodCall_WithMagicMethod' => [ + // Similar test in MixinAnnotationTest.php + 'code' => 'foo();', + 'error_message' => 'UndefinedMagicMethod', + ], + 'undefinedMixinClassWithStaticMethodCall' => [ + // Similar test in MixinAnnotationTest.php + 'code' => ' 'UndefinedMethod', + ], + 'undefinedMixinClassWithStaticMethodCall_WithMagicMethod' => [ + // Similar test in MixinAnnotationTest.php + 'code' => ' 'UndefinedMagicMethod', + ], + ]; + } }