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