summaryrefslogtreecommitdiffstats
path: root/tests/lib/encryption/keys/storage.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/encryption/keys/storage.php')
-rw-r--r--tests/lib/encryption/keys/storage.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/lib/encryption/keys/storage.php b/tests/lib/encryption/keys/storage.php
index 8ab46987f8c..bcf1c0f7624 100644
--- a/tests/lib/encryption/keys/storage.php
+++ b/tests/lib/encryption/keys/storage.php
@@ -198,6 +198,10 @@ class StorageTest extends TestCase {
public function testDeleteUserKey() {
$this->view->expects($this->once())
+ ->method('file_exists')
+ ->with($this->equalTo('/user1/files_encryption/encModule/user1.publicKey'))
+ ->willReturn(true);
+ $this->view->expects($this->once())
->method('unlink')
->with($this->equalTo('/user1/files_encryption/encModule/user1.publicKey'))
->willReturn(true);
@@ -209,6 +213,10 @@ class StorageTest extends TestCase {
public function testDeleteSystemUserKey() {
$this->view->expects($this->once())
+ ->method('file_exists')
+ ->with($this->equalTo('/files_encryption/encModule/shareKey_56884'))
+ ->willReturn(true);
+ $this->view->expects($this->once())
->method('unlink')
->with($this->equalTo('/files_encryption/encModule/shareKey_56884'))
->willReturn(true);
@@ -229,6 +237,10 @@ class StorageTest extends TestCase {
->method('isSystemWideMountPoint')
->willReturn(true);
$this->view->expects($this->once())
+ ->method('file_exists')
+ ->with($this->equalTo('/files_encryption/keys/files/foo.txt/encModule/fileKey'))
+ ->willReturn(true);
+ $this->view->expects($this->once())
->method('unlink')
->with($this->equalTo('/files_encryption/keys/files/foo.txt/encModule/fileKey'))
->willReturn(true);
@@ -249,6 +261,10 @@ class StorageTest extends TestCase {
->method('isSystemWideMountPoint')
->willReturn(false);
$this->view->expects($this->once())
+ ->method('file_exists')
+ ->with($this->equalTo('/user1/files_encryption/keys/files/foo.txt/encModule/fileKey'))
+ ->willReturn(true);
+ $this->view->expects($this->once())
->method('unlink')
->with($this->equalTo('/user1/files_encryption/keys/files/foo.txt/encModule/fileKey'))
->willReturn(true);