public function testApiDone_ThrowsException_WhenHandlerRejectsInFulfillment_ForFulfilledPromise()
{
$deferred = $this->createDeferred();
$test = $this->getTest();
$test->setExpectedException(RejectionException::class);
$deferred->resolve(1);
$test->assertNull($deferred->getPromise()->done(function () {
return Promise::doReject();
}));
}