public function FulfilledPromiseTest::testAsynchronouslyInvokesOnFulfilled in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/promises/tests/FulfilledPromiseTest.php \GuzzleHttp\Tests\Promise\FulfilledPromiseTest::testAsynchronouslyInvokesOnFulfilled()
File
- vendor/
guzzlehttp/ promises/ tests/ FulfilledPromiseTest.php, line 67
Class
Namespace
GuzzleHttp\Tests\PromiseCode
public function testAsynchronouslyInvokesOnFulfilled() {
$p = new FulfilledPromise('a');
$r = null;
$f = function ($d) use (&$r) {
$r = $d;
};
$p2 = $p
->then($f);
$this
->assertNotSame($p, $p2);
$this
->assertNull($r);
\GuzzleHttp\Promise\queue()
->run();
$this
->assertEquals('a', $r);
}