supports() public method

Components are supported by all packages. This checks wheteher or not the entire package is a "component", as well as injects the script to act on components embedded in packages that are not just "component" types.
public supports ( $packageType )
Ejemplo n.º 1
0
 /**
  * Test the Installer's support() function.
  *
  * @param $type
  *   The type of library.
  * @param $expected
  *   Whether or not the given type is supported by Component Installer.
  *
  * @return void
  *
  * @dataProvider providerComponentSupports
  */
 public function testComponentSupports($type, $expected)
 {
     $installer = new Installer($this->io, $this->composer, 'component');
     $this->assertSame($expected, $installer->supports($type), sprintf('Failed to show support for %s', $type));
 }