Skip to content

Commit 532268a

Browse files
Revert "fix portability issues"
This reverts commit 3adb22b.
1 parent 573f067 commit 532268a

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

src/TextUI/Configuration/Cli/Builder.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ public function fromParameters(array $parameters): Configuration
810810
$realPath = realpath($path);
811811

812812
if (!$realPath) {
813-
throw new Exception("The path {$path} specified for the --log-events-text option could not be resolved");
813+
throw new Exception("Specified path: {$path} can't be resolved");
814814
}
815815
$logEventsText = $realPath;
816816

@@ -821,7 +821,7 @@ public function fromParameters(array $parameters): Configuration
821821
$realPath = realpath($path);
822822

823823
if (!$realPath) {
824-
throw new Exception("The path {$path} specified for the --log-events-verbose-text option could not be resolved");
824+
throw new Exception("Specified path: {$path} can't be resolved");
825825
}
826826
$logEventsVerboseText = $realPath;
827827

tests/end-to-end/cli/log-events-text-invalid-argument.phpt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
--TEST--
2-
Test fail with invalid path
2+
phpunit --no-output --log-events-text logfile.txt
33
--FILE--
44
<?php declare(strict_types=1);
5-
$traceFile = sys_get_temp_dir() . '/invalid-directory/invalid.file';
5+
$traceFile = 'dasdasdasdasd/dasdasdsa.log';
66

77
$_SERVER['argv'][] = '--do-not-cache-result';
88
$_SERVER['argv'][] = '--no-configuration';
@@ -19,6 +19,6 @@ print file_get_contents($traceFile);
1919

2020
unlink($traceFile);
2121
--EXPECTF--
22-
PHPUnit %s by Sebastian Bergmann and contributors.
22+
PHPUnit 10.5.3 by Sebastian Bergmann and contributors.
2323

24-
The path /tmp/invalid-directory/invalid.file specified for the --log-events-text option could not be resolved
24+
Specified path: dasdasdasdasd/dasdasdsa.log can't be resolved
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
--TEST--
2-
Test fail with invalid path
2+
phpunit --no-output --log-events-verbose-text logfile.txt
33
--FILE--
44
<?php declare(strict_types=1);
5-
$traceFile = sys_get_temp_dir() . '/invalid-directory/invalid.file';
5+
$traceFile = 'dasdasdasdasd/dasdasdsa.log';
66

77
$_SERVER['argv'][] = '--do-not-cache-result';
88
$_SERVER['argv'][] = '--no-configuration';
@@ -14,7 +14,11 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/log-events-text';
1414
require __DIR__ . '/../../bootstrap.php';
1515

1616
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
17+
18+
print file_get_contents($traceFile);
19+
20+
unlink($traceFile);
1721
--EXPECTF--
18-
PHPUnit %s by Sebastian Bergmann and contributors.
22+
PHPUnit 10.5.3 by Sebastian Bergmann and contributors.
1923

20-
The path /tmp/invalid-directory/invalid.file specified for the --log-events-verbose-text option could not be resolved
24+
Specified path: dasdasdasdasd/dasdasdsa.log can't be resolved

0 commit comments

Comments
 (0)