File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2660,7 +2660,6 @@ public function testCreateSignedFileRunsAsOwnerAndRestoresSession(): void {
26602660 public function testSignSequentiallyRunsEngineSignAsOwnerAndRestoresSession (): void {
26612661 $ service = $ this ->getService ([
26622662 'validateDocMdpAllowsSignatures ' ,
2663- 'getFileToSign ' ,
26642663 'getEngine ' ,
26652664 'computeHash ' ,
26662665 'updateSignRequest ' ,
@@ -2700,12 +2699,13 @@ public function testSignSequentiallyRunsEngineSignAsOwnerAndRestoresSession(): v
27002699
27012700 $ service ->expects ($ this ->once ())
27022701 ->method ('validateDocMdpAllowsSignatures ' );
2703- $ service ->expects ($ this ->once ())
2704- ->method ('getFileToSign ' )
2705- ->willReturn ($ fileToSign );
27062702 $ service ->expects ($ this ->exactly (2 ))
27072703 ->method ('getEngine ' )
2708- ->willReturn ($ engine );
2704+ ->willReturnCallback (function () use ($ service , $ fileToSign , $ engine ) {
2705+ $ fileToSignProperty = new \ReflectionProperty (SignFileService::class, 'fileToSign ' );
2706+ $ fileToSignProperty ->setValue ($ service , $ fileToSign );
2707+ return $ engine ;
2708+ });
27092709 $ service ->expects ($ this ->once ())
27102710 ->method ('computeHash ' )
27112711 ->with ($ signedFile )
You can’t perform that action at this time.
0 commit comments