packages/sql-fixture/tests/Unit/TypeMapper/IntegerWidthTest.php
1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\TypeMapper;
6
7use PHPUnit\Framework\Attributes\CoversClass;
8use PHPUnit\Framework\Attributes\UsesClass;
9use PHPUnit\Framework\TestCase;
10use SqlFixture\TypeMapper\IntegerRange;
11use SqlFixture\TypeMapper\IntegerWidth;
12
13#[CoversClass(IntegerWidth::class)]
14#[UsesClass(IntegerRange::class)]
15final class IntegerWidthTest extends TestCase
16{
17 public function testWidthIdentifiesAnIntegerStorageDomain(): void
18 {
19 $range = new IntegerRange(IntegerWidth::Bits24, unsigned: true);
20 self::assertSame(16777215, $range->maximum);
21 }
22}
23