Kraken\_Unit\Promise\_Partial\PromiseFulfilledPartial::testApiDone_ThrowsException_WhenHandlerThrowsInFulfillment_ForFulfilledPromise PHP Метод

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

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