diff --git a/src/Command/PrintOptions.php b/src/Command/PrintOptions.php new file mode 100644 index 0000000..139f1a5 --- /dev/null +++ b/src/Command/PrintOptions.php @@ -0,0 +1,28 @@ +optimizeQuality = $optimizeQuality; + } + + /** + * @inheritdoc + */ + public function read() + { + return '^QS' . ($this->optimizeQuality ? '1' : '0'); + } +} + diff --git a/tests/Command/PrintOptionsTest.php b/tests/Command/PrintOptionsTest.php new file mode 100644 index 0000000..7911f49 --- /dev/null +++ b/tests/Command/PrintOptionsTest.php @@ -0,0 +1,20 @@ +assertEquals('5e515331', bin2hex($command->read())); + } + + public function testDisabled() + { + $command = new Command\PrintOptions(false); + + $this->assertEquals('5e515330', bin2hex($command->read())); + } +}