QRMarkupTestAbstract.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Class QRMarkupTestAbstract
  4. *
  5. * @created 24.12.2017
  6. * @author Smiley <smiley@chillerlan.net>
  7. * @copyright 2017 Smiley
  8. * @license MIT
  9. */
  10. declare(strict_types=1);
  11. namespace chillerlan\QRCodeTest\Output;
  12. use chillerlan\QRCode\Data\QRMatrix;
  13. use chillerlan\QRCodeTest\Traits\CssColorModuleValueProviderTrait;
  14. use PHPUnit\Framework\Attributes\Test;
  15. /**
  16. * Tests the QRMarkup output classes
  17. */
  18. abstract class QRMarkupTestAbstract extends QROutputTestAbstract{
  19. use CssColorModuleValueProviderTrait;
  20. #[Test]
  21. public function setModuleValues():void{
  22. $this->options->outputBase64 = false;
  23. $this->options->drawLightModules = true;
  24. $this->options->moduleValues = [
  25. // data
  26. QRMatrix::M_DATA_DARK => '#4A6000',
  27. QRMatrix::M_DATA => '#ECF9BE',
  28. ];
  29. $this->outputInterface = $this->getOutputInterface($this->options, $this->matrix);
  30. $data = $this->outputInterface->dump();
  31. $this::assertStringContainsString('#4A6000', $data);
  32. $this::assertStringContainsString('#ECF9BE', $data);
  33. }
  34. }