1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Update PearPackageExtractor for package.xml 2.1 support

This commit is contained in:
Alexey Prilipko 2012-06-15 12:30:08 +11:00
parent 71ac073ebe
commit a88265a497
3 changed files with 48 additions and 2 deletions

View file

@ -57,4 +57,25 @@ class PearPackageExtractorTest extends \PHPUnit_Framework_TestCase
);
$this->assertSame($expectedFileActions, $fileActions);
}
public function testShouldExtractPackage_2_1()
{
$extractor = $this->getMockForAbstractClass('Composer\Downloader\PearPackageExtractor', array(), '', false);
$method = new \ReflectionMethod($extractor, 'buildCopyActions');
$method->setAccessible(true);
$fileActions = $method->invoke($extractor, __DIR__ . '/Fixtures/Package_v2.1', 'php');
$expectedFileActions = array(
0 => Array(
'from' => 'Zend_Authentication-2.0.0beta4/php/Zend/Authentication/Storage/StorageInterface.php',
'to' => '/php/Zend/Authentication/Storage/StorageInterface.php',
),
1 => Array(
'from' => 'Zend_Authentication-2.0.0beta4/php/Zend/Authentication/Result.php',
'to' => '/php/Zend/Authentication/Result.php',
)
);
$this->assertSame($expectedFileActions, $fileActions);
}
}