mirror of
https://github.com/danog/parallel-functions.git
synced 2024-11-26 12:24:52 +01:00
Fix minimum requirement for amphp/amp
This ensures that elements are ordered correctly.
This commit is contained in:
parent
ca55bd1d27
commit
4ede597ee5
@ -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": {
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user