NumberTest.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Class NumberTest
  4. *
  5. * @filesource NumberTest.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\{Number, QRCodeDataException};
  14. class NumberTest extends DatainterfaceTestAbstract{
  15. protected $FQCN = Number::class;
  16. protected $testdata = '0123456789';
  17. protected $expected = [
  18. 16, 40, 12, 86, 106, 105, 0, 236,
  19. 17, 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. 201, 141, 102, 116, 238, 162, 239, 230,
  29. 222, 37, 79, 192, 42, 109, 188, 72,
  30. 89, 63, 168, 151
  31. ];
  32. public function testGetCharCodeException(){
  33. $this->expectException(QRCodeDataException::class);
  34. $this->expectExceptionMessage('illegal char: "#" [35]');
  35. $this->dataInterface->setData('#');
  36. }
  37. }