9999999 // ]; // $result = $this->withBodyFormat('json') // ->withBody(json_encode($payload)) // ->delete('api/patient'); // $result->assertStatus(404); // $json = $result->getJSON(); // bentuk string JSON // $json = json_decode($json, true); // $result->assertJSONFragment([ // 'status' => 404, // 'error' => 404 // ]); // } // public function testDeleteSuccess() { // $payload = [ // 'InternalPID' => 2 // ]; // $result = $this->withBodyFormat('json') // ->withBody(json_encode($payload)) // ->delete('api/patient'); // $result->assertStatus(200); // $json = $result->getJSON(); // bentuk string JSON // $json = json_decode($json, true); // // $this->assertSame('Patient with ID 999999 not found.', $json['message']); // $result->assertJSONFragment([ // 'status' => 'success' // ]); // } }