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