FactoryMock.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /*
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Composer\Test\Mock;
  12. use Composer\Config;
  13. use Composer\Factory;
  14. use Composer\Repository;
  15. use Composer\Repository\RepositoryManager;
  16. use Composer\Installer;
  17. use Composer\Downloader;
  18. use Composer\IO\IOInterface;
  19. class FactoryMock extends Factory
  20. {
  21. public static function createConfig()
  22. {
  23. $config = new Config();
  24. $config->merge(array(
  25. 'config' => array('home' => sys_get_temp_dir().'/composer-test'),
  26. 'repositories' => array('packagist' => false),
  27. ));
  28. return $config;
  29. }
  30. protected function addLocalRepository(RepositoryManager $rm, $vendorDir)
  31. {
  32. }
  33. protected function createInstallationManager(Repository\RepositoryManager $rm, Downloader\DownloadManager $dm, $vendorDir, $binDir, IOInterface $io)
  34. {
  35. return new InstallationManagerMock;
  36. }
  37. protected function purgePackages(Repository\RepositoryManager $rm, Installer\InstallationManager $im)
  38. {
  39. }
  40. }