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