public function whenIRunComposerWithThePlugin() { $factory = new Factory(); $this->io = new BufferIO(); $config = array_merge(array('config' => array('vendor-dir' => __DIR__ . '/__tmp/vendor'), 'repositories' => array('packagist' => false)), $this->json); $composer = $factory->createComposer($this->io, $config, true); $composer->setLocker(new Locker($this->io, new JsonFile('not-existing'), $composer->getRepositoryManager(), $composer->getInstallationManager(), '')); $this->executor = new TestProcessExecutorMock(); $composer->getDownloadManager()->setDownloader('git', new GitDownloader($this->io, $composer->getConfig(), $this->executor)); $cache = new Cache($this->io, __DIR__ . '/__tmp/vendor/cache'); $rfs = new TestRemoteFileSystemMock($this->remoteFiles); $composer->getDownloadManager()->setDownloader('file', new FileDownloader($this->io, $composer->getConfig(), $composer->getEventDispatcher(), $cache, $rfs)); $composer->getPluginManager()->addPlugin(new FidoPlugin(__DIR__ . '/__tmp')); $update = new UpdateCommand(); $update->setComposer($composer); $update->setIO($this->io); $update->run(new ArrayInput(array()), new BufferedOutput()); }