mirror of
https://github.com/composer/composer
synced 2025-05-10 00:53:06 +00:00
Fix tests
This commit is contained in:
parent
bafdf9f705
commit
528030716e
1 changed files with 6 additions and 11 deletions
|
@ -97,21 +97,16 @@ class PathRepositoryTest extends TestCase
|
||||||
$repositoryUrl = implode(DIRECTORY_SEPARATOR, array(__DIR__, 'Fixtures', 'path', '*'));
|
$repositoryUrl = implode(DIRECTORY_SEPARATOR, array(__DIR__, 'Fixtures', 'path', '*'));
|
||||||
$repository = new PathRepository(array('url' => $repositoryUrl), $ioInterface, $config);
|
$repository = new PathRepository(array('url' => $repositoryUrl), $ioInterface, $config);
|
||||||
$packages = $repository->getPackages();
|
$packages = $repository->getPackages();
|
||||||
$names = array();
|
$result = array();
|
||||||
|
|
||||||
$this->assertGreaterThanOrEqual(3, $repository->count());
|
$this->assertGreaterThanOrEqual(3, $repository->count());
|
||||||
|
|
||||||
$package = $packages[0];
|
foreach ($packages as $package) {
|
||||||
$names[] = $package->getName();
|
$result[$package->getName()] = $package->getPrettyVersion();
|
||||||
|
}
|
||||||
|
|
||||||
$package = $packages[count($packages) - 1];
|
ksort($result);
|
||||||
$names[] = $package->getName();
|
$this->assertSame(array('test/path-branch-versioned' => '1.2.x-dev', 'test/path-unversioned' => $result['test/path-unversioned'], 'test/path-versioned' => '0.0.2'), $result);
|
||||||
|
|
||||||
$package = $packages[2];
|
|
||||||
$names[] = $package->getName();
|
|
||||||
|
|
||||||
sort($names);
|
|
||||||
$this->assertSame(array('test/path-branch-versioned', 'test/path-unversioned', 'test/path-versioned'), $names);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue