You are here

public function RejectedPromiseTest::testThrowsSpecificException in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/promises/tests/RejectedPromiseTest.php \GuzzleHttp\Promise\Tests\RejectedPromiseTest::testThrowsSpecificException()

File

vendor/guzzlehttp/promises/tests/RejectedPromiseTest.php, line 58

Class

RejectedPromiseTest
@covers GuzzleHttp\Promise\RejectedPromise

Namespace

GuzzleHttp\Promise\Tests

Code

public function testThrowsSpecificException() {
  $e = new \Exception();
  $p = new RejectedPromise($e);
  try {
    $p
      ->wait(true);
    $this
      ->fail();
  } catch (\Exception $e2) {
    $this
      ->assertSame($e, $e2);
  }
}