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

testApiCancel_ThrowsExceptionInDone_FromCancellationHandler() public method

    public function testApiCancel_ThrowsExceptionInDone_FromCancellationHandler()
    {
        $deferred = $this->createDeferred();
        $test = $this->getTest();
        $test->setExpectedException(Exception::class, 'UnhandledRejectionException');
        $test->assertNull($deferred->getPromise()->done(null, null, function () {
            throw new Exception('UnhandledRejectionException');
        }));
        $deferred->cancel(1);
    }