From 58ded13eb9a80483a327d3b30ccecd2a9f7c97a0 Mon Sep 17 00:00:00 2001 From: nevvermind Date: Tue, 9 Jun 2015 15:27:11 +0100 Subject: [PATCH] Fix tests breaking on a api version bump Make generic plugins work with many API versions as opposed to just 1.0.0. --- .../Plugin/Fixtures/plugin-v1/composer.json | 2 +- .../Plugin/Fixtures/plugin-v2/composer.json | 2 +- .../Plugin/Fixtures/plugin-v3/composer.json | 2 +- .../Test/Plugin/PluginInstallerTest.php | 18 ------------------ 4 files changed, 3 insertions(+), 21 deletions(-) diff --git a/tests/Composer/Test/Plugin/Fixtures/plugin-v1/composer.json b/tests/Composer/Test/Plugin/Fixtures/plugin-v1/composer.json index efc552956..ebe56e425 100644 --- a/tests/Composer/Test/Plugin/Fixtures/plugin-v1/composer.json +++ b/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": "*" } } diff --git a/tests/Composer/Test/Plugin/Fixtures/plugin-v2/composer.json b/tests/Composer/Test/Plugin/Fixtures/plugin-v2/composer.json index 6947ddd5c..7a011070d 100644 --- a/tests/Composer/Test/Plugin/Fixtures/plugin-v2/composer.json +++ b/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": "*" } } diff --git a/tests/Composer/Test/Plugin/Fixtures/plugin-v3/composer.json b/tests/Composer/Test/Plugin/Fixtures/plugin-v3/composer.json index 5cb01d019..2061a07e3 100644 --- a/tests/Composer/Test/Plugin/Fixtures/plugin-v3/composer.json +++ b/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": "*" } } diff --git a/tests/Composer/Test/Plugin/PluginInstallerTest.php b/tests/Composer/Test/Plugin/PluginInstallerTest.php index 024561bd2..32602cd03 100644 --- a/tests/Composer/Test/Plugin/PluginInstallerTest.php +++ b/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]);