Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
11 | trait ProphecyTestDoubles |
||
12 | { |
||
13 | abstract protected function prophesize(?string $classOrInterface = null): ObjectProphecy; |
||
14 | |||
15 | /** |
||
16 | * @before |
||
17 | */ |
||
18 | 12 | protected function initialiseProphecyTestDoubles(): void |
|
19 | { |
||
20 | 12 | $doubler = new Doubler( |
|
21 | 12 | new ReflectionExtractor([TestCase::class, Assert::class]), |
|
22 | 12 | new PropertyAccessInjector(), |
|
23 | 12 | function (array $types) { |
|
24 | return $this->createTestDoubleWithProphecy($types); |
||
25 | 12 | }, |
|
26 | 12 | ObjectProphecy::class |
|
27 | 12 | ); |
|
28 | 12 | $doubler->createDoubles($this); |
|
29 | } |
||
30 | |||
31 | 12 | private function createTestDoubleWithProphecy(array $types): ObjectProphecy |
|
44 | } |
||
45 | } |
||
46 |