File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ public function run(Arguments $arguments): int
29
29
return 1 ;
30
30
}
31
31
32
+ if (!$ arguments ->reportConfigured ()) {
33
+ print 'No code coverage report configured ' . PHP_EOL ;
34
+
35
+ return 1 ;
36
+ }
37
+
32
38
$ files = (new Facade )->getFilesAsArray (
33
39
$ arguments ->directory (),
34
40
['.cov ' ]
Original file line number Diff line number Diff line change 1
1
--TEST--
2
- phpcov merge ../../fixture/empty-directory
2
+ phpcov merge --text coverage.txt ../../fixture/empty-directory
3
3
--INI--
4
4
xdebug.overload_var_dump=0
5
5
--FILE--
6
6
<?php declare (strict_types=1 );
7
7
require __DIR__ . '/../../../vendor/autoload.php ' ;
8
8
9
9
$ _SERVER ['argv ' ][1 ] = 'merge ' ;
10
- $ _SERVER ['argv ' ][2 ] = __DIR__ . '/../../fixture/empty-directory ' ;
10
+ $ _SERVER ['argv ' ][2 ] = '--text ' ;
11
+ $ _SERVER ['argv ' ][3 ] = 'coverage.txt ' ;
12
+ $ _SERVER ['argv ' ][4 ] = __DIR__ . '/../../fixture/empty-directory ' ;
11
13
12
14
var_dump ((new SebastianBergmann \PHPCOV \Application )->run ($ _SERVER ['argv ' ]));
13
15
--EXPECTF --
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ phpcov merge --text /tmp/file ../../fixture/example/coverage
3
+ --INI--
4
+ xdebug.overload_var_dump=0
5
+ --FILE--
6
+ <?php declare (strict_types=1 );
7
+ require __DIR__ . '/../../../vendor/autoload.php ' ;
8
+
9
+ $ _SERVER ['argv ' ][1 ] = 'merge ' ;
10
+ $ _SERVER ['argv ' ][2 ] = __DIR__ . '/../../fixture/example/coverage ' ;
11
+
12
+ var_dump ((new SebastianBergmann \PHPCOV \Application )->run ($ _SERVER ['argv ' ]));
13
+ --EXPECTF --
14
+ phpcov %s by Sebastian Bergmann.
15
+
16
+ No code coverage report configured
17
+ int (1 )
You can’t perform that action at this time.
0 commit comments