public function PromiseTest::testWaitsOnNestedPromises in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/promises/tests/PromiseTest.php \GuzzleHttp\Promise\Tests\PromiseTest::testWaitsOnNestedPromises()
File
- vendor/
guzzlehttp/ promises/ tests/ PromiseTest.php, line 120
Class
Namespace
GuzzleHttp\Promise\TestsCode
public function testWaitsOnNestedPromises() {
$p = new Promise(function () use (&$p) {
$p
->resolve('_');
});
$p2 = new Promise(function () use (&$p2) {
$p2
->resolve('foo');
});
$p3 = $p
->then(function () use ($p2) {
return $p2;
});
$this
->assertSame('foo', $p3
->wait());
}