From b41aa0b6dbb602119cfb70321635a86a07f46822 Mon Sep 17 00:00:00 2001 From: Paulo Henrique Garcia Date: Sat, 24 Sep 2022 07:55:20 +0200 Subject: [PATCH] Fix code snippet formatting --- guides/10-APITesting.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guides/10-APITesting.md b/guides/10-APITesting.md index b282d21e9..2ac7b7f17 100644 --- a/guides/10-APITesting.md +++ b/guides/10-APITesting.md @@ -136,7 +136,8 @@ $response = $I->send('TRACE', '/posts'); If API endpoint accepts JSON you can use `send` methods with `AsJson` suffix to convert data automatically. In this case `Content-Type` header is sent with `application/json` value and response if JSON is parsed: -```php$I->sendPostAsJson('/users', ['name' => 'old name']); +```php +$I->sendPostAsJson('/users', ['name' => 'old name']); $users = $I->sendGetAsJson('/users'); $I->sendPutAsJson('/users/' . $users[0]['id'], ['name' => 'new name']); $I->sendDeleteAsJson('/users/' . $users[1]['id']);