Kraken\_Unit\Promise\_Partial\PromiseRejectedPartial::testApiDone_ThrowsException_WhenHandlerRejectsWithRejectedNonEmptyPromise_ForRejectedPromise PHP Method

testApiDone_ThrowsException_WhenHandlerRejectsWithRejectedNonEmptyPromise_ForRejectedPromise() public method

    public function testApiDone_ThrowsException_WhenHandlerRejectsWithRejectedNonEmptyPromise_ForRejectedPromise()
    {
        $deferred = $this->createDeferred();
        $test = $this->getTest();
        $test->setExpectedException(Exception::class, 'UnhandledRejectionException');
        $deferred->reject(1);
        $test->assertNull($deferred->getPromise()->done(null, function () {
            return Promise::doReject(new Exception('UnhandledRejectionException'));
        }));
    }
PromiseRejectedPartial