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