@@ -1237,13 +1237,11 @@ public function testSignThrowsExceptionWhenDocMdpLevel1Detected(): void {
12371237 public function testValidateDocMdpAllowsSignaturesWithVariousPdfFixtures (
12381238 callable $ pdfContentGenerator ,
12391239 bool $ shouldThrowException ,
1240- ?string $ expectedExceptionMessage ,
12411240 ): void {
12421241 if (!$ shouldThrowException ) {
12431242 $ this ->expectNotToPerformAssertions ();
12441243 } else {
12451244 $ this ->expectException (LibresignException::class);
1246- $ this ->expectExceptionMessage ($ expectedExceptionMessage );
12471245 }
12481246
12491247 $ service = $ this ->getService (['getLibreSignFileAsResource ' ]);
@@ -1263,32 +1261,26 @@ public static function provideValidateDocMdpAllowsSignaturesScenarios(): array {
12631261 'Unsigned PDF - should NOT throw exception ' => [
12641262 'pdfContentGenerator ' => fn (self $ test ) => $ test ->createMinimalPdf (),
12651263 'shouldThrowException ' => false ,
1266- 'expectedExceptionMessage ' => null ,
12671264 ],
12681265 'DocMDP level 0 (not certified) - should NOT throw exception ' => [
12691266 'pdfContentGenerator ' => fn (self $ test ) => $ test ->createPdfWithDocMdp (0 , false ),
12701267 'shouldThrowException ' => false ,
1271- 'expectedExceptionMessage ' => null ,
12721268 ],
12731269 'DocMDP level 1 (no changes allowed) - SHOULD throw exception ' => [
12741270 'pdfContentGenerator ' => fn (self $ test ) => $ test ->createPdfWithDocMdp (1 , false ),
12751271 'shouldThrowException ' => true ,
1276- 'expectedExceptionMessage ' => 'This document is certified with DocMDP level 1 (no changes allowed) and cannot receive additional signatures ' ,
12771272 ],
12781273 'DocMDP level 2 (form filling allowed) - should NOT throw exception ' => [
12791274 'pdfContentGenerator ' => fn (self $ test ) => $ test ->createPdfWithDocMdp (2 , false ),
12801275 'shouldThrowException ' => false ,
1281- 'expectedExceptionMessage ' => null ,
12821276 ],
12831277 'DocMDP level 3 (annotations allowed) - should NOT throw exception ' => [
12841278 'pdfContentGenerator ' => fn (self $ test ) => $ test ->createPdfWithDocMdp (3 , false ),
12851279 'shouldThrowException ' => false ,
1286- 'expectedExceptionMessage ' => null ,
12871280 ],
12881281 'DocMDP level 1 with modifications - SHOULD throw exception ' => [
12891282 'pdfContentGenerator ' => fn (self $ test ) => $ test ->createPdfWithDocMdp (1 , true ),
12901283 'shouldThrowException ' => true ,
1291- 'expectedExceptionMessage ' => 'This document is certified with DocMDP level 1 (no changes allowed) and cannot receive additional signatures ' ,
12921284 ],
12931285 ];
12941286 }
0 commit comments