Fix minimum requirement for amphp/amp

This ensures that elements are ordered correctly.
This commit is contained in:
Niklas Keller 2017-12-17 19:31:34 +01:00
parent ca55bd1d27
commit 4ede597ee5
2 changed files with 9 additions and 1 deletions

View File

@ -25,7 +25,7 @@
"require": {
"php": ">=7",
"amphp/parallel": "^0.1.8 || ^0.2",
"amphp/amp": "^2",
"amphp/amp": "^2.0.3",
"opis/closure": "^3.0.7"
},
"require-dev": {

View File

@ -14,6 +14,14 @@ class MapTest extends TestCase {
})));
}
public function testCorrectOutputOrder() {
$this->assertSame([0, 1, 0], wait(parallelMap([0, 1, 0], function ($input) {
sleep($input);
return $input;
})));
}
public function testException() {
$this->expectException(MultiReasonException::class);