1
0
Fork 0

Fix tests

pull/9279/head
Jordi Boggiano 2020-10-13 15:01:22 +02:00
parent bafdf9f705
commit 528030716e
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 6 additions and 11 deletions

View File

@ -97,21 +97,16 @@ class PathRepositoryTest extends TestCase
$repositoryUrl = implode(DIRECTORY_SEPARATOR, array(__DIR__, 'Fixtures', 'path', '*'));
$repository = new PathRepository(array('url' => $repositoryUrl), $ioInterface, $config);
$packages = $repository->getPackages();
$names = array();
$result = array();
$this->assertGreaterThanOrEqual(3, $repository->count());
$package = $packages[0];
$names[] = $package->getName();
foreach ($packages as $package) {
$result[$package->getName()] = $package->getPrettyVersion();
}
$package = $packages[count($packages) - 1];
$names[] = $package->getName();
$package = $packages[2];
$names[] = $package->getName();
sort($names);
$this->assertSame(array('test/path-branch-versioned', 'test/path-unversioned', 'test/path-versioned'), $names);
ksort($result);
$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);
}
/**