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