diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-06-24 10:51:07 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-06-30 12:21:06 +0000 |
commit | 48be209e927c7fad0e1721a7f51a9c4923778fd1 (patch) | |
tree | 608e7f718b8d0b9ade742ce12f0222232481f5a3 /apps/encryption/lib | |
parent | bf279980ac5f7c30cfa6300dd85f48791b79f32a (diff) | |
download | nextcloud-server-48be209e927c7fad0e1721a7f51a9c4923778fd1.tar.gz nextcloud-server-48be209e927c7fad0e1721a7f51a9c4923778fd1.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; |