You are here

public function PromiseTest::testThrowsWhenUnwrapIsRejectedWithNonException in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/guzzlehttp/promises/tests/PromiseTest.php \GuzzleHttp\Promise\Tests\PromiseTest::testThrowsWhenUnwrapIsRejectedWithNonException()

@expectedException \GuzzleHttp\Promise\RejectionException @expectedExceptionMessage The promise was rejected with reason: foo

File

vendor/guzzlehttp/promises/tests/PromiseTest.php, line 83

Class

PromiseTest
@covers GuzzleHttp\Promise\Promise

Namespace

GuzzleHttp\Promise\Tests

Code

public function testThrowsWhenUnwrapIsRejectedWithNonException() {
  $p = new Promise(function () use (&$p) {
    $p
      ->reject('foo');
  });
  $p
    ->wait();
}