public function testFailedCapture()
 {
     $capture = new Capture();
     $capture->success = false;
     $action = new CaptureResponseAction();
     $action->execute($capture);
     $job = $this->jobQueue->pop();
     $this->assertNull($job, 'Should not have queued a job');
 }
 /**
  * Will run all the actions that are loaded (from the 'actions' configuration
  * node) and that are applicable to this message type. Will return true
  * if all actions returned true. Otherwise will return false. This implicitly
  * means that the message will be re-queued if any action fails. Therefore
  * all actions need to be idempotent.
  *
  * @returns bool True if all actions were successful. False otherwise.
  */
 public function runActionChain()
 {
     $action = new CaptureResponseAction();
     $result = $action->execute($this);
     if ($result === true) {
         return parent::runActionChain();
     } else {
         return false;
     }
 }