QRMarkupTestAbstract.php 1002 B

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