Просмотр исходного кода

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

smiley 5 месяцев назад
Родитель
Сommit
5477e121d3
1 измененных файлов с 10 добавлено и 0 удалено
  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\Data\QRMatrix;
 use chillerlan\QRCode\Output\{QRGdImageAVIF, QROutputInterface};
 use chillerlan\QRCode\Output\{QRGdImageAVIF, QROutputInterface};
 use chillerlan\Settings\SettingsContainerInterface;
 use chillerlan\Settings\SettingsContainerInterface;
+use function function_exists;
 
 
 final class QRGdImageAVIFTest extends QRGdImageTestAbstract{
 final class QRGdImageAVIFTest extends QRGdImageTestAbstract{
 
 
+	protected function setUp():void{
+		parent::setUp();
+
+		if(!function_exists('imageavif')){
+			$this::markTestSkipped('no AVIF support');
+		}
+
+	}
+
 	protected function getOutputInterface(
 	protected function getOutputInterface(
 		SettingsContainerInterface|QROptions $options,
 		SettingsContainerInterface|QROptions $options,
 		QRMatrix                             $matrix,
 		QRMatrix                             $matrix,