ModeTest.php 534 B

12345678910111213141516171819
  1. <?php
  2. declare(strict_types = 1);
  3. namespace BaconQrCodeTest\Common;
  4. use BaconQrCode\Common\Mode;
  5. use PHPUnit\Framework\TestCase;
  6. class ModeTest extends TestCase
  7. {
  8. public function testBitsMatchConstants() : void
  9. {
  10. $this->assertSame(0x0, Mode::TERMINATOR()->getBits());
  11. $this->assertSame(0x1, Mode::NUMERIC()->getBits());
  12. $this->assertSame(0x2, Mode::ALPHANUMERIC()->getBits());
  13. $this->assertSame(0x4, Mode::BYTE()->getBits());
  14. $this->assertSame(0x8, Mode::KANJI()->getBits());
  15. }
  16. }