QRCodeReaderGDTest.php 814 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Class QRCodeReaderGDTest
  4. *
  5. * @created 12.12.2021
  6. * @author smiley <smiley@chillerlan.net>
  7. * @copyright 2021 smiley
  8. * @license MIT
  9. */
  10. declare(strict_types=1);
  11. namespace chillerlan\QRCodeTest;
  12. use chillerlan\QRCode\Common\{GDLuminanceSource, LuminanceSourceInterface};
  13. use chillerlan\QRCode\QROptions;
  14. use chillerlan\Settings\SettingsContainerInterface;
  15. use PHPUnit\Framework\Attributes\RequiresPhpExtension;
  16. /**
  17. * Tests the GD based reader
  18. */
  19. #[RequiresPhpExtension('gd')]
  20. final class QRCodeReaderGDTest extends QRCodeReaderTestAbstract{
  21. protected function getLuminanceSourceFromFile(
  22. string $file,
  23. SettingsContainerInterface|QROptions $options,
  24. ):LuminanceSourceInterface{
  25. return GDLuminanceSource::fromFile($file, $options);
  26. }
  27. }