diff --git a/tests/Output/QRMarkupTest.php b/tests/Output/QRMarkupTest.php index f468f8fe5..ef05c6b79 100644 --- a/tests/Output/QRMarkupTest.php +++ b/tests/Output/QRMarkupTest.php @@ -60,4 +60,18 @@ class QRMarkupTest extends QROutputTestAbstract{ $this->assertSame(trim($expected), trim($this->outputInterface->dump())); } + public function testSetModuleValues(){ + + $this->options->moduleValues = [ + // data + 1024 => '#4A6000', + 4 => '#ECF9BE', + ]; + + $this->setOutputInterface(); + $data = $this->outputInterface->dump(); + $this->assertStringContainsString('#4A6000', $data); + $this->assertStringContainsString('#ECF9BE', $data); + } + } diff --git a/tests/Output/QROutputTestAbstract.php b/tests/Output/QROutputTestAbstract.php index 765b6de3f..3a44a3349 100644 --- a/tests/Output/QROutputTestAbstract.php +++ b/tests/Output/QROutputTestAbstract.php @@ -41,7 +41,7 @@ abstract class QROutputTestAbstract extends QRTestAbstract{ protected function setUp():void{ parent::setUp(); - $this->options = new QROptions; + $this->options = new QROptions; $this->setOutputInterface(); } diff --git a/tests/Output/QRStringTest.php b/tests/Output/QRStringTest.php index d8d112379..5dbd34010 100644 --- a/tests/Output/QRStringTest.php +++ b/tests/Output/QRStringTest.php @@ -38,4 +38,19 @@ class QRStringTest extends QROutputTestAbstract{ $this->assertSame($data, file_get_contents($this->options->cachefile)); } + public function testSetModuleValues(){ + + $this->options->moduleValues = [ + // data + 1024 => 'A', + 4 => 'B', + ]; + + $this->setOutputInterface(); + $data = $this->outputInterface->dump(); + + $this->assertStringContainsString('A', $data); + $this->assertStringContainsString('B', $data); + } + }