Skip to content

Commit d0097c9

Browse files
committed
simplify blackbox configuration
1 parent 1194a90 commit d0097c9

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

‎blackbox.php‎

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,19 @@
1010
};
1111

1212
Application::new($argv)
13-
->when(
14-
\getenv('BLACKBOX_SET_SIZE') !== false,
15-
static fn(Application $app) => $app->scenariiPerProof((int) \getenv('BLACKBOX_SET_SIZE')),
16-
)
17-
->when(
18-
\getenv('ENABLE_COVERAGE') !== false,
19-
static fn(Application $app) => $app
13+
->map(static fn($app) => match (\getenv('BLACKBOX_ENV')) {
14+
'extensive' => $app->scenariiPerProof(1_000),
15+
'coverage' => $app
2016
->codeCoverage(
2117
CodeCoverage::of(
2218
__DIR__.'/src/',
23-
__DIR__.'/tests/',
19+
__DIR__.'/proofs/',
20+
__DIR__.'/fixtures/',
2421
)
25-
->dumpTo('coverage.clover')
26-
->enableWhen(true),
22+
->dumpTo('coverage.clover'),
2723
)
2824
->scenariiPerProof(1),
29-
)
25+
default => $app,
26+
})
3027
->tryToProve(Load::directory(__DIR__.'/tests/'))
3128
->exit();

0 commit comments

Comments
 (0)