Tests Process.
More...
Tests Process.
Definition at line 26 of file ProcessTest.php.
◆ providerGetComponentName()
ComponentInstaller\Test\Process\ProcessTest::providerGetComponentName |
( |
| ) |
|
◆ setUp()
ComponentInstaller\Test\Process\ProcessTest::setUp |
( |
| ) |
|
Definition at line 68 of file ProcessTest.php.
References array.
70 $this->filesystem =
new Filesystem();
72 $this->config =
new Config();
73 $this->io =
new NullIO();
75 $this->componentDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.
'component-installer-componentDir';
76 $this->vendorDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.
'component-installer-vendorDir';
77 $this->binDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.
'component-installer-binDir';
79 foreach (
array($this->componentDir, $this->vendorDir, $this->binDir) as $dir) {
81 $this->filesystem->removeDirectory($dir);
83 $this->filesystem->ensureDirectoryExists($dir);
85 $this->config->merge(
array(
87 'vendor-dir' => $this->vendorDir,
88 'component-dir' => $this->componentDir,
89 'bin-dir' => $this->binDir,
92 $this->composer->setConfig($this->config);
95 $this->installationManager =
new InstallationManager();
96 $this->installationManager->addInstaller(
new LibraryInstaller($this->io, $this->composer));
97 $this->installationManager->addInstaller(
new Installer($this->io, $this->composer));
98 $this->composer->setInstallationManager($this->installationManager);
Create styles array
The data for the language used.
◆ tearDown()
ComponentInstaller\Test\Process\ProcessTest::tearDown |
( |
| ) |
|
|
protected |
Definition at line 101 of file ProcessTest.php.
References array.
103 foreach (
array($this->componentDir, $this->vendorDir, $this->binDir) as $dir) {
104 $this->filesystem->removeDirectory($dir);
Create styles array
The data for the language used.
◆ testGetComponentName()
ComponentInstaller\Test\Process\ProcessTest::testGetComponentName |
( |
|
$prettyName, |
|
|
array |
$extra, |
|
|
|
$expected |
|
) |
| |
testGetComponentName
providerGetComponentName
- Parameters
-
string | $prettyName | |
array | $extra | |
string | $expected | |
Definition at line 116 of file ProcessTest.php.
References $result, and array.
118 $process =
new Process($this->composer, $this->io);
119 $result = $process->getComponentName($prettyName,
array(
'component' => $extra));
120 $this->assertEquals(
$result, $expected, sprintf(
'Fail to get proper component name for %s', $prettyName));
Create styles array
The data for the language used.
◆ $binDir
ComponentInstaller\Test\Process\ProcessTest::$binDir |
|
protected |
◆ $componentDir
ComponentInstaller\Test\Process\ProcessTest::$componentDir |
|
protected |
◆ $composer
ComponentInstaller\Test\Process\ProcessTest::$composer |
|
protected |
◆ $config
ComponentInstaller\Test\Process\ProcessTest::$config |
|
protected |
◆ $filesystem
ComponentInstaller\Test\Process\ProcessTest::$filesystem |
|
protected |
◆ $installationManager
ComponentInstaller\Test\Process\ProcessTest::$installationManager |
|
protected |
◆ $io
ComponentInstaller\Test\Process\ProcessTest::$io |
|
protected |
◆ $vendorDir
ComponentInstaller\Test\Process\ProcessTest::$vendorDir |
|
protected |
The documentation for this class was generated from the following file:
- libs/composer/vendor/robloach/component-installer/tests/ComponentInstaller/Test/Process/ProcessTest.php