Browse Source

:octocat: skip AVIF output test if not supported/installed

smiley 5 months ago
parent
commit
5477e121d3
1 changed files with 10 additions and 0 deletions
  1. 10 0
      tests/Output/QRGdImageAVIFTest.php

+ 10 - 0
tests/Output/QRGdImageAVIFTest.php

@@ -15,9 +15,19 @@ use chillerlan\QRCode\QROptions;
 use chillerlan\QRCode\Data\QRMatrix;
 use chillerlan\QRCode\Output\{QRGdImageAVIF, QROutputInterface};
 use chillerlan\Settings\SettingsContainerInterface;
+use function function_exists;
 
 final class QRGdImageAVIFTest extends QRGdImageTestAbstract{
 
+	protected function setUp():void{
+		parent::setUp();
+
+		if(!function_exists('imageavif')){
+			$this::markTestSkipped('no AVIF support');
+		}
+
+	}
+
 	protected function getOutputInterface(
 		SettingsContainerInterface|QROptions $options,
 		QRMatrix                             $matrix,