diff --git a/src/TextUI/Configuration/Cli/Builder.php b/src/TextUI/Configuration/Cli/Builder.php index 9e303b46b45..62d63c7db38 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("Specified path: {$path} can't 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("Specified path: {$path} can't 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 1362b641765..080474f3ea8 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,8 +1,8 @@ --TEST-- -phpunit --no-output --log-events-text logfile.txt +Test fail with invalid path --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- -PHPUnit 10.5.3 by Sebastian Bergmann and contributors. +PHPUnit %s by Sebastian Bergmann and contributors. -Specified path: dasdasdasdasd/dasdasdsa.log can't be resolved +The path /tmp/invalid-directory/invalid.file specified for the --log-events-verbose-text option could not be resolved