implement getAll in fake text repo
This commit is contained in:
parent
21076f10e8
commit
0853aacdfb
1 changed files with 16 additions and 0 deletions
|
|
@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue