2012-05-13 19:40:42 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* This file is part of Composer.
|
|
|
|
*
|
|
|
|
* (c) Nils Adermann <naderman@naderman.de>
|
|
|
|
* Jordi Boggiano <j.boggiano@seld.be>
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Composer\Test\Mock;
|
|
|
|
|
2012-06-24 18:11:06 +00:00
|
|
|
use Composer\Composer;
|
2012-05-13 19:40:42 +00:00
|
|
|
use Composer\Config;
|
|
|
|
use Composer\Factory;
|
|
|
|
use Composer\Repository\RepositoryManager;
|
2014-12-13 16:14:03 +00:00
|
|
|
use Composer\Repository\WritableRepositoryInterface;
|
2012-05-13 19:40:42 +00:00
|
|
|
use Composer\Installer;
|
|
|
|
use Composer\IO\IOInterface;
|
2016-04-01 11:07:42 +00:00
|
|
|
use Composer\TestCase;
|
2012-05-13 19:40:42 +00:00
|
|
|
|
|
|
|
class FactoryMock extends Factory
|
|
|
|
{
|
2014-12-16 11:12:13 +00:00
|
|
|
public static function createConfig(IOInterface $io = null, $cwd = null)
|
2012-05-13 19:40:42 +00:00
|
|
|
{
|
2014-12-16 11:12:13 +00:00
|
|
|
$config = new Config(true, $cwd);
|
2012-05-13 19:40:42 +00:00
|
|
|
|
2012-06-24 11:03:55 +00:00
|
|
|
$config->merge(array(
|
2016-04-01 11:07:42 +00:00
|
|
|
'config' => array('home' => TestCase::getUniqueTmpDirectory()),
|
2012-06-24 11:03:55 +00:00
|
|
|
'repositories' => array('packagist' => false),
|
|
|
|
));
|
2012-05-13 19:40:42 +00:00
|
|
|
|
|
|
|
return $config;
|
|
|
|
}
|
|
|
|
|
2016-01-10 20:06:10 +00:00
|
|
|
protected function addLocalRepository(IOInterface $io, RepositoryManager $rm, $vendorDir)
|
2012-05-13 19:40:42 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-11-29 08:33:51 +00:00
|
|
|
protected function createInstallationManager()
|
2012-05-13 19:40:42 +00:00
|
|
|
{
|
|
|
|
return new InstallationManagerMock;
|
|
|
|
}
|
|
|
|
|
2012-06-24 18:11:06 +00:00
|
|
|
protected function createDefaultInstallers(Installer\InstallationManager $im, Composer $composer, IOInterface $io)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-12-13 16:14:03 +00:00
|
|
|
protected function purgePackages(WritableRepositoryInterface $repo, Installer\InstallationManager $im)
|
2012-05-13 19:40:42 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|