Skip to content

Commit

Permalink
Update withBody method to accept array only
Browse files Browse the repository at this point in the history
  • Loading branch information
Thavarshan committed Oct 3, 2024
1 parent c05b84c commit 7406869
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/Integration/HttpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
$clientHandler = new ClientHandler();
$clientHandler->setSyncClient($mockClient);

$response = $clientHandler->withBody(json_encode(['name' => 'John']))
$response = $clientHandler->withBody(['name' => 'John'])
->post('https://example.com/users');

expect($response->getStatusCode())->toBe(201);
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/ClientHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
$clientHandler = new ClientHandler();
$clientHandler->setSyncClient($mockClient);

$response = $clientHandler->withBody(json_encode(['name' => 'John']))
$response = $clientHandler->withBody(['name' => 'John'])
->post('https://example.com/users');

expect($response->getStatusCode())->toBe(201);
Expand Down

0 comments on commit 7406869

Please sign in to comment.