mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Add support for TAR in Artifact packages (#9105)
This commit is contained in:
parent
ff757e649c
commit
657ae5519e
12 changed files with 166 additions and 4 deletions
|
@ -36,6 +36,7 @@ class ArtifactRepositoryTest extends TestCase
|
|||
'vendor1/package2-4.3.2',
|
||||
'vendor3/package1-5.4.3',
|
||||
'test/jsonInRoot-1.0.0',
|
||||
'test/jsonInRootTarFile-1.0.0',
|
||||
'test/jsonInFirstLevel-1.0.0',
|
||||
//The files not-an-artifact.zip and jsonSecondLevel are not valid
|
||||
//artifacts and do not get detected.
|
||||
|
@ -52,6 +53,13 @@ class ArtifactRepositoryTest extends TestCase
|
|||
sort($foundPackages);
|
||||
|
||||
$this->assertSame($expectedPackages, $foundPackages);
|
||||
|
||||
$tarPackage = array_filter($repo->getPackages(), function (BasePackage $package) {
|
||||
return $package->getPrettyName() === 'test/jsonInRootTarFile';
|
||||
});
|
||||
$this->assertCount(1, $tarPackage);
|
||||
$tarPackage = array_pop($tarPackage);
|
||||
$this->assertSame('tar', $tarPackage->getDistType());
|
||||
}
|
||||
|
||||
public function testAbsoluteRepoUrlCreatesAbsoluteUrlPackages()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue