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