diff --git a/tests/Template/ClassTemplateTest.php b/tests/Template/ClassTemplateTest.php index f447f8d8c..6c40d7a03 100644 --- a/tests/Template/ClassTemplateTest.php +++ b/tests/Template/ClassTemplateTest.php @@ -16,6 +16,49 @@ class ClassTemplateTest extends TestCase public function providerValidCodeParse(): iterable { return [ + 'templateIntersection' => [ + 'code' => ' + */ + final class FooRepository implements RepositoryInterface + { + /** + * @var Foo[] + */ + public array $elements = []; + + public function byId(string $id): ?Foo + { + return $this->elements[$id] ?? null; + } + } + ' + ], 'cachingIterator' => [ 'code' => '