From a4f726aab0dbfbfa18ab1b4f86a8a579abfb6f54 Mon Sep 17 00:00:00 2001 From: Marko Petrovic Date: Sun, 31 Dec 2023 12:59:41 +0100 Subject: [PATCH] improve formatting --- src/TextUI/Configuration/Cli/Builder.php | 4 ++-- .../end-to-end/cli/log-events-text-invalid-argument.phpt | 9 ++------- .../cli/log-events-verbose-text-invalid-argument.phpt | 5 ++--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/TextUI/Configuration/Cli/Builder.php b/src/TextUI/Configuration/Cli/Builder.php index 62d63c7db38..b0d98ac2b5c 100644 --- a/src/TextUI/Configuration/Cli/Builder.php +++ b/src/TextUI/Configuration/Cli/Builder.php @@ -808,7 +808,7 @@ public function fromParameters(array $parameters): Configuration $realPath = realpath($path); if (!$realPath) { - throw new Exception("The path {$path} specified for the --log-events-text option could not be resolved"); + throw new Exception("The path \"{$path}\" specified for the --log-events-text option could not be resolved"); } $logEventsText = $realPath; @@ -819,7 +819,7 @@ public function fromParameters(array $parameters): Configuration $realPath = realpath($path); if (!$realPath) { - throw new Exception("The path {$path} specified for the --log-events-verbose-text option could not be resolved"); + throw new Exception("The path \"{$path}\" specified for the --log-events-verbose-text option could not be resolved"); } $logEventsVerboseText = $realPath; diff --git a/tests/end-to-end/cli/log-events-text-invalid-argument.phpt b/tests/end-to-end/cli/log-events-text-invalid-argument.phpt index 080474f3ea8..34c7a8ee50c 100644 --- a/tests/end-to-end/cli/log-events-text-invalid-argument.phpt +++ b/tests/end-to-end/cli/log-events-text-invalid-argument.phpt @@ -1,5 +1,5 @@ --TEST-- -Test fail with invalid path +Test fails with invalid path --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -The path /tmp/invalid-directory/invalid.file specified for the --log-events-text option could not be resolved +The path "/tmp/invalid-directory/invalid.file" specified for the --log-events-text option could not be resolved diff --git a/tests/end-to-end/cli/log-events-verbose-text-invalid-argument.phpt b/tests/end-to-end/cli/log-events-verbose-text-invalid-argument.phpt index 4c4a71ff242..f99e6982669 100644 --- a/tests/end-to-end/cli/log-events-verbose-text-invalid-argument.phpt +++ b/tests/end-to-end/cli/log-events-verbose-text-invalid-argument.phpt @@ -1,5 +1,5 @@ --TEST-- -Test fail with invalid path +Test fails with invalid path --FILE--