Ejemplo n.º 1
0
 /**
  * common part of testEndUser1 and testEndUser2
  *
  * @throws PublicKeyMissingException
  */
 public function endTest()
 {
     // prepare internal variables
     self::invokePrivate($this->instance, 'isWriteOperation', [true]);
     self::invokePrivate($this->instance, 'writeCache', ['']);
     $this->keyManagerMock->expects($this->any())->method('getPublicKey')->will($this->returnCallback([$this, 'getPublicKeyCallback']));
     $this->keyManagerMock->expects($this->any())->method('addSystemKeys')->will($this->returnCallback([$this, 'addSystemKeysCallback']));
     $this->cryptMock->expects($this->any())->method('multiKeyEncrypt')->willReturn(true);
     $this->cryptMock->expects($this->any())->method('setAllFileKeys')->willReturn(true);
     $this->instance->end('/foo/bar');
 }