public function cancelShouldRejectPromiseWithExceptionIfCancellerThrows()
{
$e = new \Exception();
$adapter = $this->getPromiseTestAdapter(function () use($e) {
throw $e;
});
$mock = $this->createCallableMock();
$mock->expects($this->once())->method('__invoke')->with($this->identicalTo($e));
$adapter->promise()->then($this->expectCallableNever(), $mock);
$adapter->promise()->cancel();
}