You are here

public function PromiseTest::testCreatesPromiseWhenRejectedWithNoCallback in Zircon Profile 8.0

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

File

vendor/guzzlehttp/promises/tests/PromiseTest.php, line 326

Class

PromiseTest
@covers GuzzleHttp\Promise\Promise

Namespace

GuzzleHttp\Promise\Tests

Code

public function testCreatesPromiseWhenRejectedWithNoCallback() {
  $p = new Promise();
  $p
    ->reject('foo');
  $p2 = $p
    ->then();
  $this
    ->assertNotSame($p, $p2);
  $this
    ->assertInstanceOf('GuzzleHttp\\Promise\\RejectedPromise', $p2);
}