Skip to content

Commit 520732b

Browse files
committed
Update test case
1 parent 5b90233 commit 520732b

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

tests/TestCase.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,11 @@ protected function mockNederlandPostcodeClient(): void
2929
$mockAddresses = $this->createStub(AddressesResource::class);
3030
$mockAddresses->method('get')
3131
->willReturnCallback(function (string $postcode, ?int $number, ?array $addition, $attributes = []) {
32-
if ($postcode === '1118BN' && $number === 800) {
33-
return $this->singleAddressResponse();
34-
}
35-
if ($postcode === '1118BN' && ($number === null || $number === 0)) {
36-
return $this->multipleAddressesResponse();
37-
}
38-
return new AddressCollection([]);
32+
return match (true) {
33+
$postcode === '1118BN' && $number === 800 => $this->singleAddressResponse(),
34+
$postcode === '1118BN' && ($number === null || $number === 0) => $this->multipleAddressesResponse(),
35+
default => new AddressCollection([]),
36+
};
3937
});
4038

4139
$mockQuota = $this->createStub(QuotaResource::class);

0 commit comments

Comments
 (0)