QRImagickTest.php 871 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Class QRImagickTest
  4. *
  5. * @filesource QRImagickTest.php
  6. * @created 04.07.2018
  7. * @package chillerlan\QRCodeTest\Output
  8. * @author smiley <smiley@chillerlan.net>
  9. * @copyright 2018 smiley
  10. * @license MIT
  11. */
  12. namespace chillerlan\QRCodeTest\Output;
  13. use chillerlan\QRCode\{QRCode, Output\QRImagick};
  14. class QRImagickTest extends QROutputTestAbstract{
  15. protected $FQCN = QRImagick::class;
  16. public function setUp():void{
  17. if(!extension_loaded('imagick')){
  18. $this->markTestSkipped('ext-imagick not loaded');
  19. }
  20. }
  21. public function testImageOutput(){
  22. $type = QRCode::OUTPUT_IMAGICK;
  23. $this->options->outputType = $type;
  24. $this->setOutputInterface();
  25. $this->outputInterface->dump($this::cachefile.$type);
  26. $img = $this->outputInterface->dump();
  27. $this->assertSame($img, file_get_contents($this::cachefile.$type));
  28. }
  29. }