You are here

public function PromiseTest::testCannotRejectResolveWithSameValue in Zircon Profile 8.0

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

@expectedException \LogicException @expectedExceptionMessage Cannot change a fulfilled promise to rejected

File

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

Class

PromiseTest
@covers GuzzleHttp\Promise\Promise

Namespace

GuzzleHttp\Promise\Tests

Code

public function testCannotRejectResolveWithSameValue() {
  $p = new Promise();
  $p
    ->resolve('foo');
  $p
    ->reject('foo');
}