Skip to content

Commit

Permalink
Creating Success Regression Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
issidorov committed Aug 21, 2024
1 parent dd24f5b commit 2cbd8b0
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions tests/MixinAnnotationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,21 @@ class A {}
(new A)->foo;',
'error_message' => 'UndefinedPropertyFetch',
],
'undefinedMixinClassWithPropertyFetch_WithMagicMethod' => [
'code' => '<?php
/**
* @property string $baz
* @mixin B
*/
class A {
public function __get(string $name): string {
return "";
}
}
(new A)->foo;',
'error_message' => 'UndefinedMagicPropertyFetch',
],
'undefinedMixinClassWithPropertyAssignment' => [
'code' => '<?php
/** @mixin B */
Expand All @@ -632,6 +647,40 @@ class A {}
(new A)->foo();',
'error_message' => 'UndefinedMethod',
],
'undefinedMixinClassWithMethodCall_WithMagicMethod' => [
'code' => '<?php
/**
* @method baz()
* @mixin B
*/
class A {
public function __call(string $name, array $arguments) {}
}
(new A)->foo();',
'error_message' => 'UndefinedMagicMethod',
],
'undefinedMixinClassWithStaticMethodCall' => [
'code' => '<?php
/** @mixin B */
class A {}
A::foo();',
'error_message' => 'UndefinedMethod',
],
'undefinedMixinClassWithStaticMethodCall_WithMagicMethod' => [
'code' => '<?php
/**
* @method baz()
* @mixin B
*/
class A {
public static function __callStatic(string $name, array $arguments) {}
}
A::foo();',
'error_message' => 'UndefinedMagicMethod',
],
'inheritTemplatedMixinWithSelf' => [
'code' => '<?php
/**
Expand Down

0 comments on commit 2cbd8b0

Please sign in to comment.