File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -225,8 +225,9 @@ public function handleRequest(Request $request)
225225
226226 if  ($ this  ->config ->getMode () == 'none '  || $ this  ->config ->getMode () == 'once '  && $ this  ->cassette ->isNew () === false ) {
227227 throw  new  \LogicException (
228-  "Invalid http request. The cassette inserted did not have the necessary response.  " 
229-  . "If you want to send a request anyway, make sure your mode is set to new_episodes. " );
228+  "The request does not match a previously recorded request and the 'mode' is set to ' {$ this  ->config ->getMode ()}'.  " 
229+  . "If you want to send the request anyway, make sure your 'mode' is set to 'new_episodes'.  " 
230+  . "Please see http://php-vcr.github.io/documentation/configuration/#record-modes. " );
230231 }
231232
232233 $ this  ->disableLibraryHooks ();
Original file line number Diff line number Diff line change @@ -62,8 +62,8 @@ public function testHandleRequestThrowsExceptionWhenModeIsNone()
6262 {
6363 $ this  ->setExpectedException (
6464 'LogicException ' ,
65-  "Invalid http  request. The cassette inserted did not have  the necessary response .  " 
66-  . "If you want to send a  request anyway, make sure your mode is set to new_episodes. " );
65+  "The  request does not match a previously recorded request and  the 'mode' is set to 'none' .  " 
66+  . "If you want to send the  request anyway, make sure your ' mode'  is set to ' new_episodes' . " );
6767
6868 $ request  = new  Request ('GET ' , 'http://example.com ' , array ('User-Agent '  => 'Unit-Test ' ));
6969 $ response  = new  Response (200 , array (), 'example response ' );
@@ -109,8 +109,8 @@ public function testHandleRequestThrowsExceptionWhenModeIsOnceAndCassetteIsOld()
109109 {
110110 $ this  ->setExpectedException (
111111 'LogicException ' ,
112-  "Invalid http  request. The cassette inserted did not have  the necessary response .  " 
113-  . "If you want to send a  request anyway, make sure your mode is set to new_episodes. " );
112+  "The  request does not match a previously recorded request and  the 'mode' is set to 'once' .  " 
113+  . "If you want to send the  request anyway, make sure your ' mode'  is set to ' new_episodes' . " );
114114
115115 $ request  = new  Request ('GET ' , 'http://example.com ' , array ('User-Agent '  => 'Unit-Test ' ));
116116 $ response  = new  Response (200 , array (), 'example response ' );
                                 You can’t perform that action at this time. 
               
                  
0 commit comments