فهرست منبع

skip some tests when the zip extension misses

It is required for some tests to run.
Grégoire Paris 10 سال پیش
والد
کامیت
091fee8a3b
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 8 0
      tests/Composer/Test/Repository/ArtifactRepositoryTest.php

+ 8 - 0
tests/Composer/Test/Repository/ArtifactRepositoryTest.php

@@ -19,6 +19,14 @@ use Composer\Package\BasePackage;
 
 class ArtifactRepositoryTest extends TestCase
 {
+    public function setUp()
+    {
+        parent::setUp();
+        if (!extension_loaded('zip')) {
+            $this->markTestSkipped('You need the zip extension to run this test.');
+        }
+    }
+
     public function testExtractsConfigsFromZipArchives()
     {
         $expectedPackages = array(