Merge pull request #4912 from remicollet/issue-result-order

make this test more robust, not relying on result order which may vary
main
Jordi Boggiano 8 years ago
commit 7420265c0d

@ -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);
}
/**

Loading…
Cancel
Save