mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Merge pull request #775 from palex-fpt/PR-746
PEAR Packages extraction based on package.xml format
This commit is contained in:
commit
ccc6fa3714
9 changed files with 425 additions and 7 deletions
|
@ -29,6 +29,30 @@ class PearRepositoryTest extends TestCase
|
|||
*/
|
||||
private $remoteFilesystem;
|
||||
|
||||
public function testComposerNonCompatibleRepositoryShouldSetIncludePath()
|
||||
{
|
||||
$url = 'pear.phpmd.org';
|
||||
$expectedPackages = array(
|
||||
array('name' => 'pear-phpmd/PHP_PMD', 'version' => '1.3.3'),
|
||||
);
|
||||
|
||||
$repoConfig = array(
|
||||
'url' => $url
|
||||
);
|
||||
|
||||
$this->createRepository($repoConfig);
|
||||
|
||||
foreach ($expectedPackages as $expectedPackage) {
|
||||
$package = $this->repository->findPackage($expectedPackage['name'], $expectedPackage['version']);
|
||||
$this->assertInstanceOf('Composer\Package\PackageInterface',
|
||||
$package,
|
||||
'Expected package ' . $expectedPackage['name'] . ', version ' . $expectedPackage['version'] .
|
||||
' not found in pear channel ' . $url
|
||||
);
|
||||
$this->assertSame(array('/'), $package->getIncludePaths());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider repositoryDataProvider
|
||||
* @param string $url
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue