public function RejectedPromiseTest::testInvokesOnRejectedAsynchronously in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/promises/tests/RejectedPromiseTest.php \GuzzleHttp\Promise\Tests\RejectedPromiseTest::testInvokesOnRejectedAsynchronously()
File
- vendor/
guzzlehttp/ promises/ tests/ RejectedPromiseTest.php, line 84
Class
Namespace
GuzzleHttp\Promise\TestsCode
public function testInvokesOnRejectedAsynchronously() {
$p = new RejectedPromise('a');
$r = null;
$f = function ($reason) use (&$r) {
$r = $reason;
};
$p
->then(null, $f);
$this
->assertNull($r);
\GuzzleHttp\Promise\queue()
->run();
$this
->assertEquals('a', $r);
}