public function FunctionsTest::testAllAggregatesSortedArray in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/promises/tests/functionsTest.php \GuzzleHttp\Promise\Tests\FunctionsTest::testAllAggregatesSortedArray()
File
- vendor/
guzzlehttp/ promises/ tests/ functionsTest.php, line 89
Class
Namespace
GuzzleHttp\Promise\TestsCode
public function testAllAggregatesSortedArray() {
$a = new Promise();
$b = new Promise();
$c = new Promise();
$d = \GuzzleHttp\Promise\all([
$a,
$b,
$c,
]);
$b
->resolve('b');
$a
->resolve('a');
$c
->resolve('c');
$d
->then(function ($value) use (&$result) {
$result = $value;
}, function ($reason) use (&$result) {
$result = $reason;
});
P\queue()
->run();
$this
->assertEquals([
'a',
'b',
'c',
], $result);
}