Kraken\_Unit\Promise\_Partial\ApiRejectPartial::testApiDone_ThrowsException_WhenRejectionHandlerRejectsWithException PHP Method

testApiDone_ThrowsException_WhenRejectionHandlerRejectsWithException() public method

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