浏览代码

:fire_engine:

codemasher 4 年之前
父节点
当前提交
6209776330
共有 2 个文件被更改,包括 11 次插入3 次删除
  1. 2 2
      .github/workflows/tests.yml
  2. 9 1
      tests/Output/QRImageTest.php

+ 2 - 2
.github/workflows/tests.yml

@@ -25,7 +25,7 @@ jobs:
       - name: "Install PHP"
       - name: "Install PHP"
         uses: shivammathur/setup-php@v2
         uses: shivammathur/setup-php@v2
         with:
         with:
-          php-version: "7.2"
+          php-version: "7.4"
           coverage: none
           coverage: none
           tools: pecl
           tools: pecl
           extensions: ast, gd, imagick, json, mbstring
           extensions: ast, gd, imagick, json, mbstring
@@ -46,7 +46,7 @@ jobs:
       matrix:
       matrix:
         os:
         os:
           - ubuntu-latest
           - ubuntu-latest
-          - windows-latest
+#          - windows-latest
         php-version:
         php-version:
           - "7.2"
           - "7.2"
           - "7.3"
           - "7.3"

+ 9 - 1
tests/Output/QRImageTest.php

@@ -13,6 +13,7 @@
 namespace chillerlan\QRCodeTest\Output;
 namespace chillerlan\QRCodeTest\Output;
 
 
 use chillerlan\QRCode\{QRCode, Output\QRImage};
 use chillerlan\QRCode\{QRCode, Output\QRImage};
+use const PHP_MAJOR_VERSION;
 
 
 class QRImageTest extends QROutputTestAbstract{
 class QRImageTest extends QROutputTestAbstract{
 
 
@@ -63,7 +64,14 @@ class QRImageTest extends QROutputTestAbstract{
 
 
 		$this->setOutputInterface();
 		$this->setOutputInterface();
 
 
-		$this::assertIsResource($this->outputInterface->dump());
+		$data = $this->outputInterface->dump();
+
+		if(PHP_MAJOR_VERSION >= 8){
+			$this::assertInstanceOf('\\GdImage', $data);
+		}
+		else{
+			$this::assertIsResource($data);
+		}
 	}
 	}
 
 
 }
 }