| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class NumberUtilTest extends TestCase |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @dataProvider provideArab2roman |
||
| 19 | * |
||
| 20 | * @param int $number |
||
| 21 | * @param string $expected |
||
| 22 | */ |
||
| 23 | public function testArab2roman(int $number, ?string $expected) |
||
| 24 | { |
||
| 25 | $this::assertSame( |
||
| 26 | $expected, |
||
| 27 | NumberUtil::arab2roman($number) |
||
| 28 | ); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function provideArab2roman(): array |
||
| 32 | { |
||
| 33 | return [ |
||
| 34 | [24, 'XXIV'], |
||
| 35 | [-12, null], |
||
| 36 | ]; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function testArab2romanLowerSize() |
||
| 40 | { |
||
| 41 | $this::assertSame( |
||
| 42 | 'xxiv', |
||
| 43 | NumberUtil::arab2roman(24, true) |
||
| 44 | ); |
||
| 47 |