QRStringJSONTest.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * Class QRStringJSONTest
  4. *
  5. * @created 11.12.2021
  6. * @author smiley <smiley@chillerlan.net>
  7. * @copyright 2021 smiley
  8. * @license MIT
  9. */
  10. namespace chillerlan\QRCodeTest\Output;
  11. use chillerlan\QRCode\QROptions;
  12. use chillerlan\QRCode\Data\QRMatrix;
  13. use chillerlan\QRCode\Output\{QROutputInterface, QRStringJSON};
  14. use chillerlan\Settings\SettingsContainerInterface;
  15. use PHPUnit\Framework\Attributes\DataProvider;
  16. use function extension_loaded;
  17. /**
  18. *
  19. */
  20. final class QRStringJSONTest extends QROutputTestAbstract{
  21. /**
  22. * @inheritDoc
  23. */
  24. protected function setUp():void{
  25. // just in case someone's running this on some weird distro that's been compiled without ext-json
  26. if(!extension_loaded('json')){
  27. $this::markTestSkipped('ext-json not loaded');
  28. }
  29. parent::setUp();
  30. }
  31. protected function getOutputInterface(
  32. SettingsContainerInterface|QROptions $options,
  33. QRMatrix $matrix
  34. ):QROutputInterface{
  35. return new QRStringJSON($options, $matrix);
  36. }
  37. public static function moduleValueProvider():array{
  38. return [[null, false]];
  39. }
  40. #[DataProvider('moduleValueProvider')]
  41. public function testValidateModuleValues(mixed $value, bool $expected):void{
  42. $this::markTestSkipped('N/A (JSON test)');
  43. }
  44. public function testSetModuleValues():void{
  45. $this::markTestSkipped('N/A (JSON test)');
  46. }
  47. }