File tree 3 files changed +10
-14
lines changed
src/TextUI/Configuration/Cli
3 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -808,7 +808,7 @@ public function fromParameters(array $parameters): Configuration
808
808
$ realPath = realpath ($ path );
809
809
810
810
if (!$ realPath ) {
811
- throw new Exception ("Specified path: {$ path } can't be resolved " );
811
+ throw new Exception ("The path {$ path } specified for the --log-events-text option could not be resolved " );
812
812
}
813
813
$ logEventsText = $ realPath ;
814
814
@@ -819,7 +819,7 @@ public function fromParameters(array $parameters): Configuration
819
819
$ realPath = realpath ($ path );
820
820
821
821
if (!$ realPath ) {
822
- throw new Exception ("Specified path: {$ path } can't be resolved " );
822
+ throw new Exception ("The path {$ path } specified for the --log-events-verbose-text option could not be resolved " );
823
823
}
824
824
$ logEventsVerboseText = $ realPath ;
825
825
Original file line number Diff line number Diff line change 1
1
--TEST--
2
- phpunit --no-output --log-events-text logfile.txt
2
+ Test fail with invalid path
3
3
--FILE--
4
4
<?php declare (strict_types=1 );
5
- $ traceFile = ' dasdasdasdasd/dasdasdsa.log ' ;
5
+ $ traceFile = sys_get_temp_dir () . ' /invalid-directory/invalid.file ' ;
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 10.5 . 3 by Sebastian Bergmann and contributors.
22
+ PHPUnit %s by Sebastian Bergmann and contributors.
23
23
24
- Specified path: dasdasdasdasd/dasdasdsa. log can't be resolved
24
+ The path /tmp/invalid-directory/invalid.file specified for the -- log-events-text option could not be resolved
Original file line number Diff line number Diff line change 1
1
--TEST--
2
- phpunit --no-output --log-events-verbose-text logfile.txt
2
+ Test fail with invalid path
3
3
--FILE--
4
4
<?php declare (strict_types=1 );
5
- $ traceFile = ' dasdasdasdasd/dasdasdsa.log ' ;
5
+ $ traceFile = sys_get_temp_dir () . ' /invalid-directory/invalid.file ' ;
6
6
7
7
$ _SERVER ['argv ' ][] = '--do-not-cache-result ' ;
8
8
$ _SERVER ['argv ' ][] = '--no-configuration ' ;
@@ -14,11 +14,7 @@ $_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 );
21
17
--EXPECTF --
22
- PHPUnit 10.5 . 3 by Sebastian Bergmann and contributors.
18
+ PHPUnit %s by Sebastian Bergmann and contributors.
23
19
24
- Specified path: dasdasdasdasd/dasdasdsa. log can't be resolved
20
+ The path /tmp/invalid-directory/invalid.file specified for the -- log-events-verbose-text option could not be resolved
You can’t perform that action at this time.
0 commit comments