|
|
|
@ -52,6 +52,13 @@ class PluginInstallerTest extends \PHPUnit_Framework_TestCase
|
|
|
|
|
->method('getLocalRepository')
|
|
|
|
|
->will($this->returnValue($this->repository));
|
|
|
|
|
|
|
|
|
|
$im = $this->getMock('Composer\Installer\InstallationManager');
|
|
|
|
|
$im->expects($this->any())
|
|
|
|
|
->method('getInstallPath')
|
|
|
|
|
->will($this->returnCallback(function ($package) {
|
|
|
|
|
return __DIR__.'/Fixtures/'.$package->getPrettyName();
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
$this->io = $this->getMock('Composer\IO\IOInterface');
|
|
|
|
|
|
|
|
|
|
$dispatcher = $this->getMockBuilder('Composer\EventDispatcher\EventDispatcher')->disableOriginalConstructor()->getMock();
|
|
|
|
@ -62,6 +69,7 @@ class PluginInstallerTest extends \PHPUnit_Framework_TestCase
|
|
|
|
|
$this->composer->setConfig($config);
|
|
|
|
|
$this->composer->setDownloadManager($dm);
|
|
|
|
|
$this->composer->setRepositoryManager($rm);
|
|
|
|
|
$this->composer->setInstallationManager($im);
|
|
|
|
|
$this->composer->setAutoloadGenerator($this->autoloadGenerator);
|
|
|
|
|
|
|
|
|
|
$this->pm = new PluginManager($this->composer, $this->io);
|
|
|
|
|