public function testGuestComment() { $recordId = $this->api->record()->post($this->guestAppId, KintoneTestHelper::getRecord(), $this->guestSpaceId)['id']; $id = $this->api->comment()->post($this->guestAppId, $recordId, 'test comment', [], $this->guestSpaceId)['id']; $comments = $this->api->comments()->get($this->guestAppId, $recordId, 'desc', 0, 1, $this->guestSpaceId); $comment = reset($comments); self::assertEquals($comment['id'], $id); self::assertEquals(rtrim(ltrim($comment['text'])), 'test comment'); $this->api->comment()->delete($this->guestAppId, $recordId, $id, $this->guestSpaceId); $comments = $this->api->comments()->get($this->guestAppId, $recordId, 'desc', 0, 10, $this->guestSpaceId); self::assertEquals(count($comments), 0); }