From 48be209e927c7fad0e1721a7f51a9c4923778fd1 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 24 Jun 2021 10:51:07 +0200 Subject: 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 --- apps/encryption/lib/Command/FixEncryptedVersion.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apps/encryption/lib') 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("Path $path does not exist. Please provide a valid path."); + $output->writeln("Path \"$path\" does not exist. Please provide a valid path."); 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("The file $path is: OK"); + $output->writeln("The file \"$path\" is: OK"); } \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("Attempting to fix the path: $path"); + $output->writeln("Attempting to fix the path: \"$path\""); return $this->correctEncryptedVersion($path, $output); } return false; -- cgit v1.2.3