summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-10-15 09:15:58 +0200
committerGitHub <noreply@github.com>2018-10-15 09:15:58 +0200
commite36d4a990d19113cd763e5893faaa4d1877d4022 (patch)
tree0a245efb1e06fe0e998b8a66b31c5f934aa0c642 /tests
parent82a5833217d8fb1a74e7838b3e2ccf2cb9e1b90c (diff)
parentec2f02f4a06412218738cd94e6e91bae7f28ac48 (diff)
downloadnextcloud-server-e36d4a990d19113cd763e5893faaa4d1877d4022.tar.gz
nextcloud-server-e36d4a990d19113cd763e5893faaa4d1877d4022.zip
Merge pull request #10439 from eugulixes/improve-encrypt-all-and-decrypt-all-commands
Check if TTY is invalid in encryption:encrypt-all and encryption:decrypt-all
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Command/Encryption/DecryptAllTest.php3
-rw-r--r--tests/Core/Command/Encryption/EncryptAllTest.php3
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/Core/Command/Encryption/DecryptAllTest.php b/tests/Core/Command/Encryption/DecryptAllTest.php
index 1b01231ac57..c8572864060 100644
--- a/tests/Core/Command/Encryption/DecryptAllTest.php
+++ b/tests/Core/Command/Encryption/DecryptAllTest.php
@@ -73,6 +73,9 @@ class DecryptAllTest extends TestCase {
$this->decryptAll = $this->getMockBuilder(\OC\Encryption\DecryptAll::class)
->disableOriginalConstructor()->getMock();
$this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock();
+ $this->consoleInput->expects($this->any())
+ ->method('isInteractive')
+ ->willReturn(true);
$this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock();
$this->config->expects($this->any())
diff --git a/tests/Core/Command/Encryption/EncryptAllTest.php b/tests/Core/Command/Encryption/EncryptAllTest.php
index 554560a35b7..ca7b264c98f 100644
--- a/tests/Core/Command/Encryption/EncryptAllTest.php
+++ b/tests/Core/Command/Encryption/EncryptAllTest.php
@@ -78,6 +78,9 @@ class EncryptAllTest extends TestCase {
->disableOriginalConstructor()
->getMock();
$this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock();
+ $this->consoleInput->expects($this->any())
+ ->method('isInteractive')
+ ->willReturn(true);
$this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock();
}