QRMarkupTestAbstract.php 937 B

12345678910111213141516171819202122232425262728293031323334353637
  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. /**
  14. * Tests the QRMarkup output module
  15. */
  16. abstract class QRMarkupTestAbstract extends QROutputTestAbstract{
  17. use CssColorModuleValueProviderTrait;
  18. public function testSetModuleValues():void{
  19. $this->options->outputBase64 = false;
  20. $this->options->drawLightModules = true;
  21. $this->options->moduleValues = [
  22. // data
  23. QRMatrix::M_DATA_DARK => '#4A6000',
  24. QRMatrix::M_DATA => '#ECF9BE',
  25. ];
  26. $this->outputInterface = $this->getOutputInterface($this->options, $this->matrix);
  27. $data = $this->outputInterface->dump();
  28. $this::assertStringContainsString('#4A6000', $data);
  29. $this::assertStringContainsString('#ECF9BE', $data);
  30. }
  31. }