:octocat: skip failing test under PHP-WIN < 8.1

This commit is contained in:
smiley
2023-01-30 18:14:02 +01:00
parent 426c16a89b
commit 97f16b017d
+5 -3
View File
@@ -13,7 +13,7 @@ namespace chillerlan\QRCodeTest;
use chillerlan\QRCode\Decoder\IMagickLuminanceSource;
use chillerlan\QRCode\QRCode;
use function extension_loaded;
use const PHP_OS_FAMILY;
use const PHP_OS_FAMILY, PHP_VERSION_ID;
/**
* Tests the Imagick based reader
@@ -44,8 +44,6 @@ final class QRCodeReaderImagickTest extends QRCodeReaderTestAbstract{
}
/**
* This test fails on Windows and PHP < 8.1 for whatever reason
*
* @dataProvider vectorQRCodeProvider
*/
public function testReadVectorFormats(string $img, string $expected):void{
@@ -54,6 +52,10 @@ final class QRCodeReaderImagickTest extends QRCodeReaderTestAbstract{
$this::markTestSkipped('avoid imagick conversion errors (ha ha)');
}
if(PHP_OS_FAMILY === 'Windows' && PHP_VERSION_ID < 80100){
$this::markTestSkipped('This test fails on Windows and PHP < 8.1 for whatever reason');
}
$this::assertSame($expected, (string)(new QRCode)
->readFromSource(IMagickLuminanceSource::fromFile(__DIR__.'/samples/'.$img, $this->options)));
}