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