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