1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 08:32:56 +00:00

Moved file back to correct location. (+1 squashed commit)

Squashed commits:
[eec32aa] Updated detection to only allow composer.josn in root or first level dir.
This commit is contained in:
Danack 2014-02-21 09:44:04 +00:00
parent bc76e0014b
commit 24aba5b51f
11 changed files with 16 additions and 10 deletions

View file

@ -27,10 +27,12 @@ class ArtifactRepositoryTest extends TestCase
'vendor1/package2-4.3.2',
'vendor3/package1-5.4.3',
'test/jsonInRoot-1.0.0',
'test/jsonInFirstLevel-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.
);
$coordinates = array('type' => 'artifact', 'url' => __DIR__ . '/Fixtures/artifacts/correct');
$coordinates = array('type' => 'artifact', 'url' => __DIR__ . '/Fixtures/artifacts');
$repo = new ArtifactRepository($coordinates, new NullIO(), new Config());
$foundPackages = array_map(function(BasePackage $package) {
@ -42,14 +44,6 @@ class ArtifactRepositoryTest extends TestCase
$this->assertSame($expectedPackages, $foundPackages);
}
public function testExtractConfigFails()
{
$this->setExpectedException('RuntimeException', "Shouldn't have picked up composer.json from a location other than root or first level directory.");
$coordinates = array('type' => 'artifact', 'url' => __DIR__ . '/Fixtures/artifacts/error/jsonWrongDirectory');
new ArtifactRepository($coordinates, new NullIO(), new Config());
}
}
//$archivesToCreate = array(