getComponentPath() public method

Gets the destination Component directory.
public getComponentPath ( Composer\Package\PackageInterface $package ) : string
$package Composer\Package\PackageInterface
return string The path to where the final Component should be installed.
示例#1
0
 /**
  * Tests the Installer's getComponentPath function.
  *
  * @param $expected
  *   The expected install path for the package.
  * @param $package
  *   The package to test upon.
  *
  * @dataProvider providerGetComponentPath
  *
  * @see \ComponentInstaller\Installer::getComponentPath()
  */
 public function testGetComponentPath($expected, $package)
 {
     // Construct the mock objects.
     $installer = new Installer($this->io, $this->composer, 'component');
     $loader = new ArrayLoader();
     // Test the results.
     $result = $installer->getComponentPath($loader->load($package));
     $this->assertEquals($this->componentDir . '/' . $expected, $result);
 }