public function PromiseTest::testCreatesPromiseWhenRejectedAfterThen in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/promises/tests/PromiseTest.php \GuzzleHttp\Promise\Tests\PromiseTest::testCreatesPromiseWhenRejectedAfterThen()
File
- vendor/
guzzlehttp/ promises/ tests/ PromiseTest.php, line 303
Class
Namespace
GuzzleHttp\Promise\TestsCode
public function testCreatesPromiseWhenRejectedAfterThen() {
$p = new Promise();
$carry = null;
$p2 = $p
->then(null, function ($v) use (&$carry) {
$carry = $v;
});
$this
->assertNotSame($p, $p2);
$p
->reject('foo');
P\queue()
->run();
$this
->assertEquals('foo', $carry);
}