getComponentPath() 공개 메소드

Gets the destination Component directory.
public getComponentPath ( Composer\Package\PackageInterface $package ) : string
$package Composer\Package\PackageInterface
리턴 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);
 }