1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Avoid duplicate commands, and pass plugin to ctor args for capabilities, refs #3377

This commit is contained in:
Jordi Boggiano 2016-04-28 21:12:26 +01:00
parent 090295dbcb
commit ba909d8795
5 changed files with 28 additions and 5 deletions

View file

@ -306,7 +306,7 @@ class PluginInstallerTest extends TestCase
$installer = new PluginInstaller($this->io, $this->composer);
$this->pm->loadInstalledPlugins();
$caps = $this->pm->getPluginCapabilities('Composer\Plugin\Capability\CommandProvider');
$caps = $this->pm->getPluginCapabilities('Composer\Plugin\Capability\CommandProvider', array('composer' => $this->composer, 'io' => $this->io));
$this->assertCount(1, $caps);
$this->assertInstanceOf('Composer\Plugin\Capability\CommandProvider', $caps[0]);
@ -341,7 +341,7 @@ class PluginInstallerTest extends TestCase
$this->assertInstanceOf($capabilityApi, $capability);
$this->assertInstanceOf($capabilityImplementation, $capability);
$this->assertSame(array('a' => 1, 'b' => 2), $capability->args);
$this->assertSame(array('a' => 1, 'b' => 2, 'plugin' => $plugin), $capability->args);
}
public function invalidImplementationClassNames()