diff options
Diffstat (limited to 'apps/encryption/tests/Command/FixEncryptedVersionTest.php')
-rw-r--r-- | apps/encryption/tests/Command/FixEncryptedVersionTest.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/apps/encryption/tests/Command/FixEncryptedVersionTest.php b/apps/encryption/tests/Command/FixEncryptedVersionTest.php index 14143223264..ee9ad1ac89f 100644 --- a/apps/encryption/tests/Command/FixEncryptedVersionTest.php +++ b/apps/encryption/tests/Command/FixEncryptedVersionTest.php @@ -333,9 +333,6 @@ The file \"/$this->userId/files/sub/hello.txt\" is: OK", $output); $this->assertStringNotContainsString('world.txt', $output); } - /** - * Test commands with a directory path - */ public function testExecuteWithNoUser() { $this->util->expects($this->once())->method('isMasterKeyEnabled') ->willReturn(true); @@ -347,6 +344,20 @@ The file \"/$this->userId/files/sub/hello.txt\" is: OK", $output); $output = $this->commandTester->getDisplay(); + $this->assertStringContainsString('No user id provided', $output); + } + + public function testExecuteWithBadUser() { + $this->util->expects($this->once())->method('isMasterKeyEnabled') + ->willReturn(true); + + $this->commandTester->execute([ + 'user' => 'nonexisting', + '--path' => "/" + ]); + + $output = $this->commandTester->getDisplay(); + $this->assertStringContainsString('does not exist', $output); } |