Kraken\_Unit\Promise\_Partial\PromiseCancelledPartial::testApiDone_ThrowsException_WhenHandlerCancelsInCancellation_ForCancelledPromise PHP Метод

testApiDone_ThrowsException_WhenHandlerCancelsInCancellation_ForCancelledPromise() публичный Метод

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