public function rethrowsExceptionsThrownFromCancel()
{
$this->setExpectedException('\\Exception', 'test');
$mock = $this->getMockBuilder('React\\Promise\\CancellablePromiseInterface')->getMock();
$mock->expects($this->once())->method('cancel')->will($this->throwException(new \Exception('test')));
$cancellationQueue = new CancellationQueue();
$cancellationQueue->enqueue($mock);
$cancellationQueue();
}