public function PromiseTest::testCancelsPromiseWithCancelFunction in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/promises/tests/PromiseTest.php \GuzzleHttp\Promise\Tests\PromiseTest::testCancelsPromiseWithCancelFunction()
File
- vendor/
guzzlehttp/ promises/ tests/ PromiseTest.php, line 194
Class
Namespace
GuzzleHttp\Promise\TestsCode
public function testCancelsPromiseWithCancelFunction() {
$called = false;
$p = new Promise(null, function () use (&$called) {
$called = true;
});
$p
->cancel();
$this
->assertEquals('rejected', $p
->getState());
$this
->assertTrue($called);
}