Skip to content

Commit fadef65

Browse files
committed
seeMockRequestWasCalled param $times as optional, checking the times only if it's provided
1 parent 0b13c95 commit fadef65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MockServerHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ public function __construct()
1616
$this->mockserverClient = new Client(['base_uri' => 'http://mockserver:1080']);
1717
}
1818

19-
public function seeMockRequestWasCalled(string $expectationId, int $times = 1): void
19+
public function seeMockRequestWasCalled(string $expectationId, ?int $times = null): void
2020
{
2121
$body = [
2222
'expectationId' => ['id' => $expectationId],
23-
'times' => ['atLeast' => $times, 'atMost' => $times]
23+
'times' => ['atLeast' => $times ?? 1, 'atMost' => $times ?? 1000]
2424
];
2525
$request = new Request('PUT', '/mockserver/verify', [], json_encode($body));
2626
$response = $this->mockserverClient->sendRequest($request);

0 commit comments

Comments
 (0)