| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 94.74% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | trait PHPUnitTestDoubles |
||
| 14 | { |
||
| 15 | abstract public function getMockBuilder(string $className): MockBuilder; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @before |
||
| 19 | */ |
||
| 20 | 6 | protected function initialisePHPUnitTestDoubles(): void |
|
| 21 | { |
||
| 22 | 6 | $doubler = new Doubler( |
|
| 23 | 6 | new ReflectionExtractor([TestCase::class, Assert::class]), |
|
| 24 | 6 | new PropertyAccessInjector(), |
|
| 25 | 6 | function (array $types) { |
|
| 26 | 6 | return $this->createTestDoubleWithPhpunit($types); |
|
| 27 | 6 | }, |
|
| 28 | 6 | MockObject::class |
|
| 29 | ); |
||
| 30 | 6 | $doubler->createDoubles($this); |
|
| 31 | } |
||
| 32 | |||
| 33 | 6 | private function createTestDoubleWithPhpunit(array $types): MockObject |
|
| 44 | } |
||
| 45 | } |
||
| 46 |