QRMarkupTestAbstract.php 912 B

123456789101112131415161718192021222324252627282930313233343536
  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. public function testSetModuleValues():void{
  18. $this->options->outputBase64 = false;
  19. $this->options->drawLightModules = true;
  20. $this->options->moduleValues = [
  21. // data
  22. QRMatrix::M_DATA_DARK => '#4A6000',
  23. QRMatrix::M_DATA => '#ECF9BE',
  24. ];
  25. $this->outputInterface = $this->getOutputInterface($this->options, $this->matrix);
  26. $data = $this->outputInterface->dump();
  27. $this::assertStringContainsString('#4A6000', $data);
  28. $this::assertStringContainsString('#ECF9BE', $data);
  29. }
  30. }