public function FunctionsTest::testReturnsPromiseForThennable in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/promises/tests/functionsTest.php \GuzzleHttp\Promise\Tests\FunctionsTest::testReturnsPromiseForThennable()
File
- vendor/
guzzlehttp/ promises/ tests/ functionsTest.php, line 23
Class
Namespace
GuzzleHttp\Promise\TestsCode
public function testReturnsPromiseForThennable() {
$p = new Thennable();
$wrapped = \GuzzleHttp\Promise\promise_for($p);
$this
->assertNotSame($p, $wrapped);
$this
->assertInstanceOf('GuzzleHttp\\Promise\\PromiseInterface', $wrapped);
$p
->resolve('foo');
P\queue()
->run();
$this
->assertEquals('foo', $wrapped
->wait());
}