getComponentName() public method

Retrieves the component name for the component.
public getComponentName ( string $prettyName, array $extra = [] ) : string
$prettyName string The Composer package name.
$extra array The extra config options sent from Composer.
return string The name of the component, without its vendor name.
Esempio n. 1
0
 /**
  * testGetComponentName
  *
  * @dataProvider providerGetComponentName
  * @param string $prettyName
  * @param array $extra
  * @param string $expected
  */
 public function testGetComponentName($prettyName, array $extra, $expected)
 {
     $process = new Process($this->composer, $this->io);
     $result = $process->getComponentName($prettyName, array('component' => $extra));
     $this->assertEquals($result, $expected, sprintf('Fail to get proper component name for %s', $prettyName));
 }