QRMarkupTestAbstract.php 1004 B

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