- $this->json('POST', $url, $request);
- $resp = $this->decodeResponseJson();
- if (isset($resp['comment'])) {
- return $resp['comment'];
- }
- return null;
+ $this->postJson($url, $request);
+ $comment = $page->comments()->first();
+ return $comment === null ? null : $comment->id;