Kraken\_Unit\Promise\_Partial\PromiseCancelledPartial::testApiDone_ThrowsException_WhenHandlerCancelsWithCancelledNonEmptyPromise_ForCancelledPromise PHP Method

testApiDone_ThrowsException_WhenHandlerCancelsWithCancelledNonEmptyPromise_ForCancelledPromise() public method

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