예제 #1
0
 /**
  * @expectedException RuntimeException
  * @expectedExceptionMessage Transaction not registered
  */
 public function testThrowsWhenRemovingNonExistentTransaction()
 {
     $b = new puzzle_adapter_curl_BatchContext('foo', false);
     $t = new puzzle_adapter_Transaction(new puzzle_Client(), new puzzle_message_Request('GET', 'http://httbin.org'));
     $b->removeTransaction($t);
 }
예제 #2
0
 private function processResponse(puzzle_adapter_TransactionInterface $transaction, array $curl, puzzle_adapter_curl_BatchContext $context)
 {
     $info = $context->removeTransaction($transaction);
     try {
         if (!$this->isCurlException($transaction, $curl, $context, $info) && $this->validateResponseWasSet($transaction, $context)) {
             puzzle_event_RequestEvents::emitComplete($transaction, $info);
         }
     } catch (Exception $e) {
         $this->throwException($e, $context);
     }
 }