QRMarkupTestAbstract.php 938 B

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