Skip to content

Commit

Permalink
add unit test for vimeo#4460
Browse files Browse the repository at this point in the history
  • Loading branch information
ptomulik committed Feb 28, 2023
1 parent e212b06 commit 68fc72e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/Template/ClassStringMapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,22 @@ public function set(array $map): void {
}
}',
],
'simpleSetter' => [
'code' => '<?php
class Container {
/** @var class-string-map<T, T> */
public array $map = [];
/**
* @template U of object
* @param class-string<U> $key
* @param U $obj
*/
public function set(string $key, object $obj): void {
$this->map[$key] = $obj;
}
}'
,
],
];
}

Expand Down

0 comments on commit 68fc72e

Please sign in to comment.