-
-
Notifications
You must be signed in to change notification settings - Fork 132
Expand file tree
/
Copy pathIntegrationTestCase.php
More file actions
41 lines (36 loc) · 1.11 KB
/
IntegrationTestCase.php
File metadata and controls
41 lines (36 loc) · 1.11 KB
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
35
36
37
38
39
40
41
<?php
namespace PhpBench\Tests;
use PhpBench\DependencyInjection\Container;
use PhpBench\Extension\ConsoleExtension;
use PhpBench\Extension\CoreExtension;
use PhpBench\Extension\ExpressionExtension;
use PhpBench\Extension\ReportExtension;
use PhpBench\Extension\RunnerExtension;
use PhpBench\Extension\StorageExtension;
use PhpBench\Tests\Util\Workspace;
class IntegrationTestCase extends TestCase
{
protected function workspace(): Workspace
{
return Workspace::create(__DIR__ . '/Workspace');
}
/**
* @param array<string, mixed> $config
*/
protected function container(array $config = []): Container
{
return (function (Container $container) {
$container->init();
return $container;
})(new Container([
ExpressionExtension::class,
CoreExtension::class,
ReportExtension::class,
StorageExtension::class,
RunnerExtension::class,
ConsoleExtension::class,
], array_merge([
ExpressionExtension::PARAM_SYNTAX_HIGHLIGHTING => false,
], $config)));
}
}