1
0
Fork 0

make this test more robust, not relying on result order which may vary

pull/4912/head
Remi Collet 2016-02-12 17:02:19 +01:00
parent 25e089eee9
commit ae5de98db1
1 changed files with 6 additions and 2 deletions

View File

@ -69,14 +69,18 @@ class PathRepositoryTest extends TestCase
$repositoryUrl = implode(DIRECTORY_SEPARATOR, array(__DIR__, 'Fixtures', 'path', '*'));
$repository = new PathRepository(array('url' => $repositoryUrl), $ioInterface, $config, $loader);
$packages = $repository->getPackages();
$names = array();
$this->assertEquals(2, $repository->count());
$package = $packages[0];
$this->assertEquals('test/path-versioned', $package->getName());
$names[] = $package->getName();
$package = $packages[1];
$this->assertEquals('test/path-unversioned', $package->getName());
$names[] = $package->getName();
sort($names);
$this->assertEquals(array('test/path-unversioned', 'test/path-versioned'), $names);
}
/**