get('/api/v2/discussion?view=question&id=eae9fd6f-7bac-4940-b80d-ad6cd6f433bf'); $response->assertStatus(200); //testing store $response = $this->withHeaders([ 'Authorization' => $token, ])->json('POST', '/api/v2/discussion', [ 'title'=>'test', 'res_id'=>'eae9fd6f-7bac-4940-b80d-ad6cd6f433bf', 'res_type'=>'wbw', ]); $response->assertOk(); $id = $response['data']['id']; $this->assertTrue(Str::isUuid($id)); //testing answer $response = $this->withHeaders([ 'Authorization' => $token, ])->json('POST', '/api/v2/discussion', [ 'parent' => $id, 'content'=>'answer', 'res_id'=>'eae9fd6f-7bac-4940-b80d-ad6cd6f433bf', 'res_type'=>'wbw', ]); $response->assertOk(); $id = $response['data']['id']; $this->assertTrue(Str::isUuid($id)); } }