You are here

public function FulfilledPromiseTest::testDoesNotTryToFulfillTwiceDuringTrampoline in Zircon Profile 8.0

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

File

vendor/guzzlehttp/promises/tests/FulfilledPromiseTest.php, line 101

Class

FulfilledPromiseTest
@covers GuzzleHttp\Promise\FulfilledPromise

Namespace

GuzzleHttp\Tests\Promise

Code

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