Skip to content

Commit 2faae73

Browse files
committed
test: Add test case for unauthenticated signer with signature file
Add test coverage for the scenario where an unauthenticated signer (e.g., via WhatsApp) has uploaded signature elements that are stored in the folder service but accessed from a different session context during background job execution. This test verifies that the system can successfully locate and use signature files by their nodeId even when the session context differs from the upload context. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 1227295 commit 2faae73

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/php/Unit/Service/SignFileServiceTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,6 +1488,19 @@ public static function providerSetVisibleElements(): array {
14881488
isAuthenticatedSigner: true,
14891489
expectedException: LibresignException::class,
14901490
),
1491+
1492+
'unauthenticated signer with file in folder service (WhatsApp scenario)' => self::createScenarioSetVisibleElements(
1493+
signerList: [
1494+
['documentElementId' => $validDocumentId, 'profileNodeId' => $validProfileNodeId],
1495+
],
1496+
fileElements: [
1497+
['id' => $validDocumentId],
1498+
],
1499+
tempFiles: [$validProfileNodeId => $vfsPath],
1500+
signatureFile: [$validProfileNodeId => ['valid' => true, 'content' => 'valid content']],
1501+
canCreateSignature: true,
1502+
isAuthenticatedSigner: false,
1503+
),
14911504
];
14921505
}
14931506

0 commit comments

Comments
 (0)