public function InstallerTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php \Composer\Installers\Test\InstallerTest::setUp()
setUp
Return value
void
File
- vendor/
composer/ installers/ tests/ Composer/ Installers/ Test/ InstallerTest.php, line 27
Class
Namespace
Composer\Installers\TestCode
public function setUp() {
$this->fs = new Filesystem();
$this->composer = new Composer();
$this->config = new Config();
$this->composer
->setConfig($this->config);
$this->vendorDir = realpath(sys_get_temp_dir()) . DIRECTORY_SEPARATOR . 'baton-test-vendor';
$this
->ensureDirectoryExistsAndClear($this->vendorDir);
$this->binDir = realpath(sys_get_temp_dir()) . DIRECTORY_SEPARATOR . 'baton-test-bin';
$this
->ensureDirectoryExistsAndClear($this->binDir);
$this->config
->merge(array(
'config' => array(
'vendor-dir' => $this->vendorDir,
'bin-dir' => $this->binDir,
),
));
$this->dm = $this
->getMockBuilder('Composer\\Downloader\\DownloadManager')
->disableOriginalConstructor()
->getMock();
$this->composer
->setDownloadManager($this->dm);
$this->repository = $this
->getMock('Composer\\Repository\\InstalledRepositoryInterface');
$this->io = $this
->getMock('Composer\\IO\\IOInterface');
}