diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-06-24 10:51:07 +0200 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-06-29 14:39:51 +0200 |
commit | 101c65a94981b1ac6b01166c5e5e3c0bbf6128a7 (patch) | |
tree | 2f7fb89929cbd6da3bd85eae8ffa1caa062e6226 /apps/encryption/lib | |
parent | 6170912acec2d60467dd07e5d0871e68796e1408 (diff) | |
download | nextcloud-server-101c65a94981b1ac6b01166c5e5e3c0bbf6128a7.tar.gz nextcloud-server-101c65a94981b1ac6b01166c5e5e3c0bbf6128a7.zip |
Fix FixEncryptedVersionTest test
Fixed setup to use EncryptionTrait like other existing tests.
Fix expectations to not rely on side effects from previous test cases.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/encryption/lib')
-rw-r--r-- | apps/encryption/lib/Command/FixEncryptedVersion.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/encryption/lib/Command/FixEncryptedVersion.php b/apps/encryption/lib/Command/FixEncryptedVersion.php index 88a72f43324..e2181f9a229 100644 --- a/apps/encryption/lib/Command/FixEncryptedVersion.php +++ b/apps/encryption/lib/Command/FixEncryptedVersion.php @@ -121,12 +121,12 @@ class FixEncryptedVersion extends Command { private function walkPathOfUser($user, $path, OutputInterface $output): int { $this->setupUserFs($user); if (!$this->view->file_exists($path)) { - $output->writeln("<error>Path $path does not exist. Please provide a valid path.</error>"); + $output->writeln("<error>Path \"$path\" does not exist. Please provide a valid path.</error>"); return 1; } if ($this->view->is_file($path)) { - $output->writeln("Verifying the content of file $path"); + $output->writeln("Verifying the content of file \"$path\""); $this->verifyFileContent($path, $output); return 0; } @@ -139,7 +139,7 @@ class FixEncryptedVersion extends Command { if ($this->view->is_dir($path)) { $directories[] = $path; } else { - $output->writeln("Verifying the content of file $path"); + $output->writeln("Verifying the content of file \"$path\""); $this->verifyFileContent($path, $output); } } @@ -164,7 +164,7 @@ class FixEncryptedVersion extends Command { $handle = $this->view->fopen($path, 'rb'); if (\fread($handle, 9001) !== false) { - $output->writeln("<info>The file $path is: OK</info>"); + $output->writeln("<info>The file \"$path\" is: OK</info>"); } \fclose($handle); @@ -175,7 +175,7 @@ class FixEncryptedVersion extends Command { //If allowOnce is set to false, this becomes recursive. if ($ignoreCorrectEncVersionCall === true) { //Lets rectify the file by correcting encrypted version - $output->writeln("<info>Attempting to fix the path: $path</info>"); + $output->writeln("<info>Attempting to fix the path: \"$path\"</info>"); return $this->correctEncryptedVersion($path, $output); } return false; |