You are here

public function RejectionExceptionTest::testCanGetReasonFromException in Zircon Profile 8

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

File

vendor/guzzlehttp/promises/tests/RejectionExceptionTest.php, line 32

Class

RejectionExceptionTest
@covers GuzzleHttp\Promise\RejectionException

Namespace

GuzzleHttp\Promise\Tests

Code

public function testCanGetReasonFromException() {
  $thing = new Thing1('foo');
  $e = new RejectionException($thing);
  $this
    ->assertSame($thing, $e
    ->getReason());
  $this
    ->assertEquals('The promise was rejected with reason: foo', $e
    ->getMessage());
}