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 )
コード例 #1
0
ファイル: InstallerTest.php プロジェクト: ICHydro/anaconda
 /**
  * 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));
 }