From 70d1a5a3c527ad8c1a007198f3dde1044446323b Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 18 Dec 2022 18:14:43 +0100 Subject: [PATCH] Add test --- tests/Template/ClassTemplateTest.php | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) 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' => '