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