public function PromiseTest::testThrowsWaitExceptionAfterPromiseIsResolved in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/promises/tests/PromiseTest.php \GuzzleHttp\Promise\Tests\PromiseTest::testThrowsWaitExceptionAfterPromiseIsResolved()
File
- vendor/
guzzlehttp/ promises/ tests/ PromiseTest.php, line 137
Class
Namespace
GuzzleHttp\Promise\TestsCode
public function testThrowsWaitExceptionAfterPromiseIsResolved() {
$p = new Promise(function () use (&$p) {
$p
->reject('Foo!');
throw new \Exception('Bar?');
});
try {
$p
->wait();
$this
->fail();
} catch (\Exception $e) {
$this
->assertEquals('Bar?', $e
->getMessage());
}
}