File tree 3 files changed +14
-10
lines changed
src/TextUI/Configuration/Cli
3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -810,7 +810,7 @@ public function fromParameters(array $parameters): Configuration
810
810
$ realPath = realpath ($ path );
811
811
812
812
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 " );
814
814
}
815
815
$ logEventsText = $ realPath ;
816
816
@@ -821,7 +821,7 @@ public function fromParameters(array $parameters): Configuration
821
821
$ realPath = realpath ($ path );
822
822
823
823
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 " );
825
825
}
826
826
$ logEventsVerboseText = $ realPath ;
827
827
Original file line number Diff line number Diff line change 1
1
--TEST--
2
- Test fail with invalid path
2
+ phpunit --no-output --log-events-text logfile.txt
3
3
--FILE--
4
4
<?php declare (strict_types=1 );
5
- $ traceFile = sys_get_temp_dir () . ' /invalid-directory/invalid.file ' ;
5
+ $ traceFile = ' dasdasdasdasd/dasdasdsa.log ' ;
6
6
7
7
$ _SERVER ['argv ' ][] = '--do-not-cache-result ' ;
8
8
$ _SERVER ['argv ' ][] = '--no-configuration ' ;
@@ -19,6 +19,6 @@ print file_get_contents($traceFile);
19
19
20
20
unlink ($ traceFile );
21
21
--EXPECTF --
22
- PHPUnit %s by Sebastian Bergmann and contributors.
22
+ PHPUnit 10.5 . 3 by Sebastian Bergmann and contributors.
23
23
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 number Diff line number Diff line change 1
1
--TEST--
2
- Test fail with invalid path
2
+ phpunit --no-output --log-events-verbose-text logfile.txt
3
3
--FILE--
4
4
<?php declare (strict_types=1 );
5
- $ traceFile = sys_get_temp_dir () . ' /invalid-directory/invalid.file ' ;
5
+ $ traceFile = ' dasdasdasdasd/dasdasdsa.log ' ;
6
6
7
7
$ _SERVER ['argv ' ][] = '--do-not-cache-result ' ;
8
8
$ _SERVER ['argv ' ][] = '--no-configuration ' ;
@@ -14,7 +14,11 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/log-events-text';
14
14
require __DIR__ . '/../../bootstrap.php ' ;
15
15
16
16
(new PHPUnit \TextUI \Application )->run ($ _SERVER ['argv ' ]);
17
+
18
+ print file_get_contents ($ traceFile );
19
+
20
+ unlink ($ traceFile );
17
21
--EXPECTF --
18
- PHPUnit %s by Sebastian Bergmann and contributors.
22
+ PHPUnit 10.5 . 3 by Sebastian Bergmann and contributors.
19
23
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
You can’t perform that action at this time.
0 commit comments