Composer\Installers\Test\InstallerTest::setUp PHP Метод

setUp() публичный Метод

setUp
public setUp ( ) : void
Результат void
    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');
    }