| Total Complexity | 4 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class IdGeneratorRegistryTest extends TestCase |
||
| 13 | { |
||
| 14 | /** @var IdGeneratorRegistry - System Under Test */ |
||
| 15 | protected IdGeneratorRegistry $sut; |
||
| 16 | |||
| 17 | public function setUp(): void |
||
| 22 | } |
||
| 23 | |||
| 24 | public function testGetIdGeneratorCreatesGeneratorByDefault(): void |
||
| 25 | { |
||
| 26 | $className = 'foo'; |
||
| 27 | |||
| 28 | $actualResult = $this->sut->getIdGenerator($className); |
||
| 29 | |||
| 30 | $this->assertInstanceOf(UuidV4Generator::class, $actualResult); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testGetIdGeneratorReturnsPreviouslyCreatedGenerator(): void |
||
| 34 | { |
||
| 35 | $className = 'foo'; |
||
| 36 | |||
| 37 | $actualResult = $this->sut->getIdGenerator($className); |
||
| 38 | $repeatedResult = $this->sut->getIdGenerator($className); |
||
| 39 | |||
| 40 | $this->assertSame($repeatedResult, $actualResult); |
||
| 41 | } |
||
| 42 | |||
| 43 | public function testGetIdGeneratorReturnsRegisteredGenerator(): void |
||
| 55 | } |
||
| 56 | } |
||
| 57 |