| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class BloodTest extends TestCase |
||
| 16 | { |
||
| 17 | private DummyGenerator $generator; |
||
| 18 | |||
| 19 | public function setUp(): void |
||
| 20 | { |
||
| 21 | parent::setUp(); |
||
| 22 | |||
| 23 | $container = new DefinitionContainer([]); |
||
| 24 | $container->add(RandomizerInterface::class, Randomizer::class); |
||
| 25 | $container->add(BloodExtensionInterface::class, Blood::class); |
||
| 26 | $this->generator = new DummyGenerator($container); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function testBloodType(): void |
||
| 30 | { |
||
| 31 | self::assertNotEmpty($this->generator->bloodType()); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function testBloodRh(): void |
||
| 35 | { |
||
| 36 | self::assertNotEmpty($this->generator->bloodRh()); |
||
| 37 | } |
||
| 38 | |||
| 39 | public function testBloodGroup(): void |
||
| 40 | { |
||
| 41 | $bloodGroup = $this->generator->bloodGroup(); |
||
| 42 | |||
| 43 | self::assertTrue(str_ends_with($bloodGroup, '+') || str_ends_with($bloodGroup, '-')); |
||
| 44 | } |
||
| 45 | } |