ByteTest.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * Class ByteTest
  4. *
  5. * @filesource ByteTest.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\Byte;
  14. use chillerlan\QRCode\Data\QRDataInterface;
  15. use chillerlan\QRCode\QROptions;
  16. /**
  17. * Tests the Byte class
  18. */
  19. final class ByteTest extends DatainterfaceTestAbstract{
  20. /** @internal */
  21. protected string $testdata = '[¯\_(ツ)_/¯]';
  22. /** @internal */
  23. protected array $expected = [
  24. 64, 245, 188, 42, 245, 197, 242, 142,
  25. 56, 56, 66, 149, 242, 252, 42, 245,
  26. 208, 236, 17, 236, 17, 236, 17, 236,
  27. 17, 236, 17, 236, 17, 236, 17, 236,
  28. 17, 236, 17, 236, 17, 236, 17, 236,
  29. 17, 236, 17, 236, 17, 236, 17, 236,
  30. 17, 236, 17, 236, 17, 236, 17, 236,
  31. 17, 236, 17, 236, 17, 236, 17, 236,
  32. 17, 236, 17, 236, 17, 236, 17, 236,
  33. 17, 236, 17, 236, 17, 236, 17, 236,
  34. 79, 89, 226, 48, 209, 89, 151, 1,
  35. 12, 73, 42, 163, 11, 34, 255, 205,
  36. 21, 47, 250, 101
  37. ];
  38. /**
  39. * @inheritDoc
  40. * @internal
  41. */
  42. protected function getDataInterfaceInstance(QROptions $options):QRDataInterface{
  43. return new Byte($options);
  44. }
  45. }