This commit is contained in:
jf-cbd
2025-03-03 18:28:15 +01:00
parent 01e2d3b317
commit 755ac3a15c
4 changed files with 64 additions and 25 deletions

View File

@@ -42,7 +42,7 @@ class RestServicesSanitizeOutputTest extends iTopCustomDatamodelTestCase
$oRestResultWithObject = new \RestResultWithObjects();
$oRestResultWithObject->AddObject(0, "ok", $oGroup, ['Group' => ['encrypted_string']]);
$oRestResultWithObject->SanitizeContent();
$this->assertEquals('{"objects":{"Group::-1":{"code":0,"message":"ok","class":"Group","key":-1,"fields":{"encrypted_string":"******"}}},"code":0,"message":null}', json_encode($oRestResultWithObject));
$this->assertEquals('{"objects":{"Group::-1":{"code":0,"message":"ok","class":"Group","key":-1,"fields":{"encrypted_string":"*****"}}},"code":0,"message":null}', json_encode($oRestResultWithObject));
}