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