You are here

public function FulfilledPromiseTest::testOtherwiseIsSugarForRejections in Zircon Profile 8.0

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

File

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

Class

FulfilledPromiseTest
@covers GuzzleHttp\Promise\FulfilledPromise

Namespace

GuzzleHttp\Tests\Promise

Code

public function testOtherwiseIsSugarForRejections() {
  $c = null;
  $p = new FulfilledPromise('foo');
  $p
    ->otherwise(function ($v) use (&$c) {
    $c = $v;
  });
  $this
    ->assertNull($c);
}