You are here

public function RejectedPromiseTest::testDoesNotTryToRejectTwiceDuringTrampoline in Zircon Profile 8

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

File

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

Class

RejectedPromiseTest
@covers GuzzleHttp\Promise\RejectedPromise

Namespace

GuzzleHttp\Promise\Tests

Code

public function testDoesNotTryToRejectTwiceDuringTrampoline() {
  $fp = new RejectedPromise('a');
  $t1 = $fp
    ->then(null, function ($v) {
    return $v . ' b';
  });
  $t1
    ->resolve('why!');
  $this
    ->assertEquals('why!', $t1
    ->wait());
}