Esempio n. 1
0
 /**
  * Records a request and response pair.
  *
  * @param Request  $request  Request to record.
  * @param Response $response Response to record.
  *
  * @return void
  */
 public function record(Request $request, Response $response)
 {
     if ($this->hasResponse($request)) {
         return;
     }
     $recording = array('request' => $request->toArray(), 'response' => $response->toArray());
     $this->storage->storeRecording($recording);
 }
Esempio n. 2
0
 /**
  * Returns true if the cassette was created recently.
  *
  * @return boolean
  */
 public function isNew()
 {
     return $this->storage->isNew();
 }