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

testApiDone_ThrowsException_FromRejectionHandler() public method

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