15use Composer\Test\Installer\LibraryInstallerTest;
17use Composer\Package\Loader\ArrayLoader;
46 $this->componentDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.
'composer-test-component';
47 $this->ensureDirectoryExistsAndClear($this->componentDir);
50 $this->config->merge(array(
52 'component-dir' => $this->componentDir,
62 $this->fs->removeDirectory($this->componentDir);
72 $this->fs->removeDirectory($this->componentDir);
73 new Installer($this->io, $this->composer);
74 $this->assertFileNotExists($this->componentDir);
91 $installer =
new Installer($this->io, $this->composer,
'component');
92 $this->assertSame($expected, $installer->supports($type),
sprintf(
'Failed to show support for %s', $type));
103 $tests[] = array(
'component',
true);
104 $tests[] = array(
'all-supported',
false);
123 $installer =
new Installer($this->io, $this->composer,
'component');
128 $this->assertEquals($this->componentDir . DIRECTORY_SEPARATOR . $expected,
$result);
140 'type' =>
'component',
141 'version' =>
'1.0.0',
143 $tests[] = array(
'bar', $package);
146 'name' =>
'foo/bar2',
147 'version' =>
'1.0.0',
148 'type' =>
'component',
150 'component' => array(
155 $tests[] = array(
'foo', $package);
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
Component Installer for Composer.
Provides basic file system operations.
Tests registering Component Installer with Composer.
providerGetComponentPath()
Data provider for testGetComponentPath().
testInstallerCreationShouldNotCreateComponentDirectory()
Tests that the Installer doesn't create the Component directory.
testComponentSupports($type, $expected)
Test the Installer's support() function.
providerComponentSupports()
Data provider for testComponentSupports().
testGetComponentPath($expected, $package)
Tests the Installer's getComponentPath function.