diff --git a/tests/Template/ClassStringMapTest.php b/tests/Template/ClassStringMapTest.php index ba0b90b39b0..03904459c50 100644 --- a/tests/Template/ClassStringMapTest.php +++ b/tests/Template/ClassStringMapTest.php @@ -99,6 +99,28 @@ public function set(string $key, object $obj): void { }' , ], + 'assignClassStringMapInConstruct' => [ + 'code' => ' */ + private array $map; + /** @param class-string-map $map */ + public function __construct(array $map) { + $this->map = $map; + } + }', + ], + 'assignClassStringMapInMethod' => [ + 'code' => ' */ + private array $map = []; + /** @param class-string-map $map */ + public function set(array $map) { + $this->map = $map; + } + }', + ], ]; }