signature: add index on PDFSignatureZone + init POST signature

This commit is contained in:
nobohan
2024-07-11 08:06:18 +02:00
parent 39d3ba2f40
commit 77da2c1ac6
7 changed files with 66 additions and 20 deletions

View File

@@ -36,7 +36,7 @@ class RequestPdfSignMessageSerializerTest extends TestCase
$envelope = new Envelope(
$request = new RequestPdfSignMessage(
0,
new PDFSignatureZone(10.0, 10.0, 180.0, 180.0, new PDFPage(0, 500.0, 800.0)),
new PDFSignatureZone(0, 10.0, 10.0, 180.0, 180.0, new PDFPage(0, 500.0, 800.0)),
0,
'metadata to add to the signature',
'Mme Caroline Diallo',
@@ -66,7 +66,7 @@ class RequestPdfSignMessageSerializerTest extends TestCase
$request = new RequestPdfSignMessage(
0,
new PDFSignatureZone(10.0, 10.0, 180.0, 180.0, new PDFPage(0, 500.0, 800.0)),
new PDFSignatureZone(0, 10.0, 10.0, 180.0, 180.0, new PDFPage(0, 500.0, 800.0)),
0,
'metadata to add to the signature',
'Mme Caroline Diallo',
@@ -121,7 +121,7 @@ class RequestPdfSignMessageSerializerTest extends TestCase
$denormalizer = new class () implements DenormalizerInterface {
public function denormalize($data, string $type, ?string $format = null, array $context = [])
{
return new PDFSignatureZone(10.0, 10.0, 180.0, 180.0, new PDFPage(0, 500.0, 800.0));
return new PDFSignatureZone(0, 10.0, 10.0, 180.0, 180.0, new PDFPage(0, 500.0, 800.0));
}
public function supportsDenormalization($data, string $type, ?string $format = null)

View File

@@ -58,6 +58,7 @@ class PDFSignatureZoneParserTest extends TestCase
__DIR__.'/data/signature_2_signature_page_1.pdf',
[
new PDFSignatureZone(
0,
127.7,
95.289,
180.0,
@@ -65,6 +66,7 @@ class PDFSignatureZoneParserTest extends TestCase
$page = new PDFPage(0, 595.30393, 841.8897)
),
new PDFSignatureZone(
1,
269.5,
95.289,
180.0,