89 lines
2.9 KiB
PHP
89 lines
2.9 KiB
PHP
<?php
|
|
|
|
namespace Tests\Feature\Patients;
|
|
|
|
use CodeIgniter\Test\FeatureTestTrait;
|
|
use CodeIgniter\Test\CIUnitTestCase;
|
|
|
|
class PatientUpdateTest extends CIUnitTestCase
|
|
{
|
|
use FeatureTestTrait;
|
|
|
|
|
|
// public function testUpdateFail()
|
|
// {
|
|
// $payload = [];
|
|
// $result = $this->withBodyFormat('json')
|
|
// ->call('patch', 'api/patient', $payload);
|
|
// $result->assertStatus(400);
|
|
|
|
// $payload = [
|
|
// "InternalPID"=> 100,
|
|
// "PatientID"=> "SMAJ50", //Wajib Ganti
|
|
// "AlternatePID"=> "P0234",
|
|
// "Prefix"=> "Mr.",
|
|
// "NameFirst"=> "Budi",
|
|
// "NameMiddle"=> "Santoso",
|
|
// "NameMaiden"=> "Kiki",
|
|
// "NameLast"=> "Wijaya",
|
|
// "Suffix"=> "S.kom",
|
|
// "NameAlias"=> "Bud",
|
|
// "Gender"=> "1",
|
|
// 'EmailAddress1' => 'kaka@gmail.a1com', //Wajib Ganti
|
|
// 'Identity' => [
|
|
// "IdentifierType" => "KTP",
|
|
// "Identifier" => "317409050590100" //Wajib Ganti
|
|
// ]
|
|
// ];
|
|
// $result = $this->withBodyFormat('json')
|
|
// ->call('patch', 'api/patient', $payload);
|
|
// $result->assertStatus(404);
|
|
|
|
// $payload = [
|
|
// "PatientID"=> "SMAJ50", //Wajib Ganti
|
|
// "AlternatePID"=> "P0234",
|
|
// "Prefix"=> "Mr.",
|
|
// "NameFirst"=> "Budi",
|
|
// "NameMiddle"=> "Santoso",
|
|
// "NameMaiden"=> "Kiki",
|
|
// "NameLast"=> "Wijaya",
|
|
// "Suffix"=> "S.kom",
|
|
// "NameAlias"=> "Bud",
|
|
// "Gender"=> "1",
|
|
// 'EmailAddress1' => 'kaka@gmail.a1com', //Wajib Ganti
|
|
// 'Identity' => [
|
|
// "IdentifierType" => "KTP",
|
|
// "Identifier" => "317409050590100" //Wajib Ganti
|
|
// ]
|
|
// ];
|
|
// $result = $this->withBodyFormat('json')
|
|
// ->call('patch', 'api/patient', $payload);
|
|
// $result->assertStatus(500);
|
|
// }
|
|
|
|
// public function testUpdateSuccess()
|
|
// {
|
|
// $payload = [
|
|
// "InternalPID"=> 1, //Wajib Ganti
|
|
// "PatientID"=> "SMAJ50",
|
|
// "AlternatePID"=> "asasasa",
|
|
// "Prefix"=> "Mr.",
|
|
// "NameFirst"=> "Budi",
|
|
// "NameMiddle"=> "Santoso",
|
|
// "NameMaiden"=> "Kiki",
|
|
// "NameLast"=> "Wijaya",
|
|
// "Suffix"=> "S.kom",
|
|
// "NameAlias"=> "Bud",
|
|
// "Gender"=> "1",
|
|
// 'EmailAddress1' => 'kaka@gmail.a1com',
|
|
// 'Identity' => [
|
|
// "IdentifierType" => "KTP",
|
|
// "Identifier" => "317409050590100"
|
|
// ]
|
|
// ];
|
|
// $result = $this->withBodyFormat('json')
|
|
// ->call('patch', 'api/patient', $payload);
|
|
// $result->assertStatus(200);
|
|
// }
|
|
}
|