public function InstallerTest::testCustomInstallPath in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php \Composer\Installers\Test\InstallerTest::testCustomInstallPath()
testCustomInstallPath
File
- vendor/
composer/ installers/ tests/ Composer/ Installers/ Test/ InstallerTest.php, line 322
Class
Namespace
Composer\Installers\TestCode
public function testCustomInstallPath() {
$installer = new Installer($this->io, $this->composer);
$package = new Package('shama/ftp', '1.0.0', '1.0.0');
$package
->setType('cakephp-plugin');
$consumerPackage = new RootPackage('foo/bar', '1.0.0', '1.0.0');
$this->composer
->setPackage($consumerPackage);
$consumerPackage
->setExtra(array(
'installer-paths' => array(
'my/custom/path/{$name}/' => array(
'shama/ftp',
'foo/bar',
),
),
));
$result = $installer
->getInstallPath($package);
$this
->assertEquals('my/custom/path/Ftp/', $result);
}