Browse Source

Fix tests breaking on a api version bump

Make generic plugins work with many API versions as opposed to just 1.0.0.
nevvermind 9 years ago
parent
commit
58ded13eb9

+ 1 - 1
tests/Composer/Test/Plugin/Fixtures/plugin-v1/composer.json

@@ -7,6 +7,6 @@
         "class": "Installer\\Plugin"
     },
     "require": {
-        "composer-plugin-api": "1.0.0"
+        "composer-plugin-api": "*"
     }
 }

+ 1 - 1
tests/Composer/Test/Plugin/Fixtures/plugin-v2/composer.json

@@ -7,6 +7,6 @@
         "class": "Installer\\Plugin2"
     },
     "require": {
-        "composer-plugin-api": "1.0.0"
+        "composer-plugin-api": "*"
     }
 }

+ 1 - 1
tests/Composer/Test/Plugin/Fixtures/plugin-v3/composer.json

@@ -7,6 +7,6 @@
         "class": "Installer\\Plugin2"
     },
     "require": {
-        "composer-plugin-api": "1.0.0"
+        "composer-plugin-api": "*"
     }
 }

+ 0 - 18
tests/Composer/Test/Plugin/PluginInstallerTest.php

@@ -249,24 +249,6 @@ class PluginInstallerTest extends TestCase
         $this->pm->loadInstalledPlugins();
     }
 
-    public function testExactPluginVersionStyleAreRegisteredCorrectly()
-    {
-        $pluginsWithFixedAPIVersions = array(
-            $this->packages[0],
-            $this->packages[1],
-            $this->packages[2],
-        );
-
-        $this->setPluginApiVersionWithPlugins('1.0.0', $pluginsWithFixedAPIVersions);
-        $this->assertCount(3, $this->pm->getPlugins());
-
-        $this->setPluginApiVersionWithPlugins('1.0.1', $pluginsWithFixedAPIVersions);
-        $this->assertCount(0, $this->pm->getPlugins());
-
-        $this->setPluginApiVersionWithPlugins('2.0.0-dev', $pluginsWithFixedAPIVersions);
-        $this->assertCount(0, $this->pm->getPlugins());
-    }
-
     public function testStarPluginVersionWorksWithAnyAPIVersion()
     {
         $starVersionPlugin = array($this->packages[4]);