AlphaNumTest.php 693 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Class AlphaNumTest
  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\AlphaNum;
  12. /**
  13. * Tests the AlphaNum class
  14. */
  15. final class AlphaNumTest extends DataInterfaceTestAbstract{
  16. protected string $FQN = AlphaNum::class;
  17. protected string $testdata = '0 $%*+-./:';
  18. /**
  19. * isAlphaNum() should pass on the 45 defined characters and fail on anything else (e.g. lowercase)
  20. */
  21. public function stringValidateProvider():array{
  22. return [
  23. ['ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:', true],
  24. ['abc', false],
  25. ];
  26. }
  27. }