-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
kahlan-config.php
33 lines (27 loc) · 1.03 KB
/
kahlan-config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
use Kahlan\Filter\Filters;
use Kahlan\Reporter\Coverage;
use Kahlan\Reporter\Coverage\Driver\Xdebug;
// autoload hack
class_alias(Laminas\ServiceManager\AbstractPluginManager::class, Zend\ServiceManager\AbstractPluginManager::class);
Filters::apply($this, 'coverage', function($next) {
if (! extension_loaded('xdebug')) {
return;
}
$reporters = $this->reporters();
$coverage = new Coverage([
'verbosity' => $this->commandLine()->get('coverage'),
'driver' => new Xdebug(),
'path' => $this->commandLine()->get('src'),
'exclude' => [
// laminas-cli preview console command
'src/Command/Preview/ErrorPreviewConsoleCommand.php',
// laminas-mvc preview page
'src/Controller/ErrorPreviewController.php',
// mezzio preview page
'src/Middleware/Routed/Preview/ErrorPreviewAction.php',
],
'colors' => ! $this->commandLine()->get('no-colors')
]);
$reporters->add('coverage', $coverage);
});