File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2724,7 +2724,6 @@ public function testCreateSignedFileRunsAsOwnerAndRestoresSession(): void {
27242724 public function testSignSequentiallyRunsEngineSignAsOwnerAndRestoresSession (): void {
27252725 $ service = $ this ->getService ([
27262726 'validateDocMdpAllowsSignatures ' ,
2727- 'getFileToSign ' ,
27282727 'getEngine ' ,
27292728 'computeHash ' ,
27302729 'updateSignRequest ' ,
@@ -2764,12 +2763,13 @@ public function testSignSequentiallyRunsEngineSignAsOwnerAndRestoresSession(): v
27642763
27652764 $ service ->expects ($ this ->once ())
27662765 ->method ('validateDocMdpAllowsSignatures ' );
2767- $ service ->expects ($ this ->once ())
2768- ->method ('getFileToSign ' )
2769- ->willReturn ($ fileToSign );
27702766 $ service ->expects ($ this ->exactly (2 ))
27712767 ->method ('getEngine ' )
2772- ->willReturn ($ engine );
2768+ ->willReturnCallback (function () use ($ service , $ fileToSign , $ engine ) {
2769+ $ fileToSignProperty = new \ReflectionProperty (SignFileService::class, 'fileToSign ' );
2770+ $ fileToSignProperty ->setValue ($ service , $ fileToSign );
2771+ return $ engine ;
2772+ });
27732773 $ service ->expects ($ this ->once ())
27742774 ->method ('computeHash ' )
27752775 ->with ($ signedFile )
You can’t perform that action at this time.
0 commit comments