QRStringTEXTTest.php 889 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Class QRStringTEXTTest
  4. *
  5. * @created 11.12.2021
  6. * @author smiley <smiley@chillerlan.net>
  7. * @copyright 2021 smiley
  8. * @license MIT
  9. */
  10. namespace chillerlan\QRCodeTest\Output;
  11. use chillerlan\QRCode\Data\QRMatrix;
  12. use chillerlan\QRCode\Output\QROutputInterface;
  13. /**
  14. *
  15. */
  16. final class QRStringTEXTTest extends QRStringTestAbstract{
  17. protected string $type = QROutputInterface::STRING_TEXT;
  18. /**
  19. * @inheritDoc
  20. */
  21. public function testSetModuleValues():void{
  22. $this->options->moduleValues = [
  23. // data
  24. (QRMatrix::M_DATA | QRMatrix::IS_DARK) => 'A',
  25. QRMatrix::M_DATA => 'B',
  26. ];
  27. $this->outputInterface = new $this->FQN($this->options, $this->matrix);
  28. $data = $this->outputInterface->dump();
  29. $this::assertStringContainsString('A', $data);
  30. $this::assertStringContainsString('B', $data);
  31. }
  32. }