add getAll method to carrier repo
This commit is contained in:
parent
95feab744e
commit
059c111059
2 changed files with 15 additions and 0 deletions
|
|
@ -36,4 +36,14 @@ class FakeCarrierRepository implements CarrierRepository
|
|||
{
|
||||
return count($this->existingCarriers);
|
||||
}
|
||||
|
||||
public function getAll(): array
|
||||
{
|
||||
return array_map(function (Carrier $carrier) {
|
||||
return new Carrier(
|
||||
$carrier->getId(),
|
||||
$carrier->getEmail()
|
||||
);
|
||||
}, $this->existingCarriers);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue