ByteTest.php 780 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Class ByteTest
  4. *
  5. * @created 24.11.2017
  6. * @author Smiley <smiley@chillerlan.net>
  7. * @copyright 2017 Smiley
  8. * @license MIT
  9. */
  10. namespace chillerlan\QRCodeTest\Data;
  11. use chillerlan\QRCode\Data\Byte;
  12. /**
  13. * Tests the Byte class
  14. */
  15. final class ByteTest extends DatainterfaceTestAbstract{
  16. protected string $FQN = Byte::class;
  17. protected string $testdata = '[¯\_(ツ)_/¯]';
  18. /**
  19. * isByte() passses any binary string and only fails on empty strings
  20. */
  21. public function stringValidateProvider():array{
  22. return [
  23. ["\x01\x02\x03", true],
  24. [' ', true], // not empty!
  25. ['', false],
  26. ];
  27. }
  28. /**
  29. * @inheritDoc
  30. */
  31. public function testInvalidDataException():void{
  32. $this::markTestSkipped('N/A (binary mode)');
  33. }
  34. }