Kraken\_Unit\Promise\_Partial\ApiCancelPartial::testApiCancel_ThrowsExceptionInDone_WhenCancellationHandlerRejects PHP Method

testApiCancel_ThrowsExceptionInDone_WhenCancellationHandlerRejects() public method

    public function testApiCancel_ThrowsExceptionInDone_WhenCancellationHandlerRejects()
    {
        $deferred = $this->createDeferred();
        $test = $this->getTest();
        $test->setExpectedException(CancellationException::class);
        $test->assertNull($deferred->getPromise()->done(null, null, function () {
            return Promise::doCancel();
        }));
        $deferred->cancel(1);
    }