public function PromiseTest::testRejectsSelfWhenWaitThrows in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/promises/tests/PromiseTest.php \GuzzleHttp\Promise\Tests\PromiseTest::testRejectsSelfWhenWaitThrows()
File
- vendor/
guzzlehttp/ promises/ tests/ PromiseTest.php, line 108
Class
Namespace
GuzzleHttp\Promise\TestsCode
public function testRejectsSelfWhenWaitThrows() {
$e = new \UnexpectedValueException('foo');
$p = new Promise(function () use ($e) {
throw $e;
});
try {
$p
->wait();
$this
->fail();
} catch (\UnexpectedValueException $e) {
$this
->assertEquals('rejected', $p
->getState());
}
}