From 0853aacdfb3d0e95f396fd701daa898a634b31bb Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Sun, 12 Apr 2026 22:05:53 +0300 Subject: [PATCH] implement getAll in fake text repo --- tests/Fakes/FakeTextRepository.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/Fakes/FakeTextRepository.php b/tests/Fakes/FakeTextRepository.php index 86d3076..388e01c 100644 --- a/tests/Fakes/FakeTextRepository.php +++ b/tests/Fakes/FakeTextRepository.php @@ -47,4 +47,20 @@ class FakeTextRepository implements TextRepository { return count($this->existingTexts); } + + /** + * @return Text[] + */ + public function getAll(): array + { + return array_map( + function (Text $text) { + return new Text( + id: $text->getId(), + name: $text->getName(), + ); + }, + $this->existingTexts + ); + } }