public function PromiseTest::testForwardsFulfilledDownChainBetweenGaps in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/promises/tests/PromiseTest.php \GuzzleHttp\Promise\Tests\PromiseTest::testForwardsFulfilledDownChainBetweenGaps()
File
- vendor/
guzzlehttp/ promises/ tests/ PromiseTest.php, line 355
Class
Namespace
GuzzleHttp\Promise\TestsCode
public function testForwardsFulfilledDownChainBetweenGaps() {
$p = new Promise();
$r = $r2 = null;
$p
->then(null, null)
->then(function ($v) use (&$r) {
$r = $v;
return $v . '2';
})
->then(function ($v) use (&$r2) {
$r2 = $v;
});
$p
->resolve('foo');
P\queue()
->run();
$this
->assertEquals('foo', $r);
$this
->assertEquals('foo2', $r2);
}