Browse Source

skip some tests when the zip extension misses

It is required for some tests to run.
Grégoire Paris 10 years ago
parent
commit
091fee8a3b
1 changed files with 8 additions and 0 deletions
  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(