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'));
}));
}