Наследование: extends Composer\Installer\LibraryInstaller
Пример #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);
 }
Пример #2
0
 /**
  * testSupports
  *
  * @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));
 }