public function testApiDone_ThrowsException_WhenHandlerCancelsWithNonException_ForCancelledPromise()
{
$deferred = $this->createDeferred();
$test = $this->getTest();
$test->setExpectedException(CancellationException::class);
$deferred->cancel(1);
$test->assertNull($deferred->getPromise()->done());
}