-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblackbox.php
More file actions
34 lines (31 loc) · 906 Bytes
/
Copy pathblackbox.php
File metadata and controls
34 lines (31 loc) · 906 Bytes
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
34
<?php
declare(strict_types = 1);
require 'vendor/autoload.php';
use Innmind\BlackBox\{
Application,
Runner\Load,
Runner\CodeCoverage,
PHPUnit,
};
Application::new($argv)
->when(
\getenv('BLACKBOX_SET_SIZE') !== false,
static fn(Application $app) => $app->scenariiPerProof((int) \getenv('BLACKBOX_SET_SIZE')),
)
->when(
\getenv('ENABLE_COVERAGE') !== false,
static fn(Application $app) => $app
->scenariiPerProof(1)
->codeCoverage(
CodeCoverage::of(
__DIR__.'/src/',
__DIR__.'/proofs/',
)
->dumpTo('coverage.clover'),
),
)
->tryToProve(static function($prove) {
yield from Load::everythingIn(__DIR__.'/proofs/')($prove);
yield from PHPUnit\Load::testsAt(__DIR__.'/tests/');
})
->exit();