| Total Complexity | 5 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class FakeContainer implements ContainerInterface |
||
| 11 | { |
||
| 12 | private TestCase $testCase; |
||
| 13 | public function __construct(TestCase $testCase) |
||
| 14 | { |
||
| 15 | $this->testCase = $testCase; |
||
| 16 | } |
||
| 17 | public function get($id) |
||
| 18 | { |
||
| 19 | if ($id === Aliases::class) { |
||
| 20 | return new Aliases(['@test-dir' => __DIR__]); |
||
| 21 | } |
||
| 22 | if (is_a($id, GeneratorInterface::class, true)) { |
||
| 23 | return new FakeGenerator($id); |
||
| 24 | } |
||
| 25 | return $this->testCase->getMockBuilder($id)->getMock(); |
||
| 26 | } |
||
| 27 | public function has($id) |
||
| 30 | } |
||
| 31 | } |
||
| 32 |