AlphaNumTest.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * Class AlphaNumTest
  4. *
  5. * @filesource AlphaNumTest.php
  6. * @created 24.11.2017
  7. * @package chillerlan\QRCodeTest\Data
  8. * @author Smiley <smiley@chillerlan.net>
  9. * @copyright 2017 Smiley
  10. * @license MIT
  11. */
  12. namespace chillerlan\QRCodeTest\Data;
  13. use chillerlan\QRCode\Data\{AlphaNum, QRCodeDataException};
  14. class AlphaNumTest extends DatainterfaceTestAbstract{
  15. protected string $FQCN = AlphaNum::class;
  16. protected string $testdata = '0 $%*+-./:';
  17. protected array $expected = [
  18. 32, 80, 36, 212, 252, 15, 175, 251,
  19. 176, 236, 17, 236, 17, 236, 17, 236,
  20. 17, 236, 17, 236, 17, 236, 17, 236,
  21. 17, 236, 17, 236, 17, 236, 17, 236,
  22. 17, 236, 17, 236, 17, 236, 17, 236,
  23. 17, 236, 17, 236, 17, 236, 17, 236,
  24. 17, 236, 17, 236, 17, 236, 17, 236,
  25. 17, 236, 17, 236, 17, 236, 17, 236,
  26. 17, 236, 17, 236, 17, 236, 17, 236,
  27. 17, 236, 17, 236, 17, 236, 17, 236,
  28. 112, 43, 9, 248, 200, 194, 75, 25,
  29. 205, 173, 154, 68, 191, 16, 128,
  30. 92, 112, 20, 198, 27
  31. ];
  32. public function testGetCharCodeException():void{
  33. $this->expectException(QRCodeDataException::class);
  34. $this->expectExceptionMessage('illegal char: "#" [35]');
  35. $this->dataInterface->setData('#');
  36. }
  37. }