-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathhelpers.php
42 lines (34 loc) · 854 Bytes
/
helpers.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
34
35
36
37
38
39
40
41
42
<?php
use Optimus\Heimdal\Reporters\ReporterInterface;
class TestReporter implements ReporterInterface
{
private $config;
public function __construct(array $config)
{
$this->config = $config;
}
public function report(Exception $e)
{
return sprintf('%s: %s', $e->getMessage(), $this->config['test']);
}
}
function getConfigStub()
{
$config = require __DIR__.'/../src/config/optimus.heimdal.php';
$reporterMock = \Mockery::mock('ReporterClass');
$config['reporters'] = [
'test' => [
'class' => TestReporter::class,
'config' => [
'test' => 1234
]
],
'test2' => [
'class' => TestReporter::class,
'config' => [
'test' => 4321
]
]
];
return $config;
}