| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class DocBlockResolverAwareTest extends TestCase |
||
| 12 | { |
||
| 13 | protected function setUp(): void |
||
| 14 | { |
||
| 15 | Gacela::bootstrap(__DIR__); |
||
| 16 | } |
||
| 17 | |||
| 18 | public function test_existing_service(): void |
||
| 19 | { |
||
| 20 | $dummy = new DummyDocBlockResolverAware(); |
||
| 21 | $actual = $dummy->getRepository()->findName(); |
||
| 22 | |||
| 23 | self::assertSame('name', $actual); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @depends test_existing_service |
||
| 28 | */ |
||
| 29 | public function test_existing_service_cached(): void |
||
| 30 | { |
||
| 31 | self::assertCount(1, CustomServicesCache::getAll()); |
||
| 32 | |||
| 33 | $dummy = new DummyDocBlockResolverAware(); |
||
| 34 | $dummy->getRepository()->findName(); |
||
| 35 | $dummy->getRepository()->findName(); |
||
| 36 | |||
| 37 | self::assertCount(1, CustomServicesCache::getAll()); |
||
| 38 | } |
||
| 39 | |||
| 40 | public function test_non_existing_service(): void |
||
| 46 | } |
||
| 47 | } |
||
| 48 |