File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ protected static function buildLocalMethodName($method)
225225 $ localMethodpreg_replace_callback (
226226 '/_(.?)/ ' ,
227227 function ($ matches
228-  return  strtoupper ($ matches0 ]);
228+  return  strtoupper ($ matches1 ]);
229229 },
230230 $ localMethod
231231 );
Original file line number Diff line number Diff line change @@ -174,6 +174,23 @@ public function testShouldNotThrowErrorWhenEnabledTwice()
174174 $ this curlHook ->disable ();
175175 }
176176
177+  /** 
178+  * @dataProvider curlMethodsProvider 
179+  */ 
180+  public  function  testBuildLocalMethodName ($ expected$ method
181+  {
182+  $ this assertEquals ($ expectedbuildLocalMethodName ($ method
183+  }
184+  public  function  curlMethodsProvider ()
185+  {
186+  return  array (
187+  'curl_multi_add_handler '  => array ('multiAddHandler ' , 'curl_multi_add_handler ' ),
188+  'curl_add_handler '  => array ('addHandler ' , 'curl_add_handler ' ),
189+  'not a curl function '  => array ('exec ' , 'curl_exec ' ),
190+  );
191+  }
192+ 
193+ 
177194 /** 
178195 * @return \callable 
179196 */ 
@@ -185,3 +202,12 @@ protected function getTestCallback($handleRequestCallback = null)
185202 };
186203 }
187204}
205+ 
206+ 
207+  class  CurlRewriteProxy extends  CurlRewrite
208+  {
209+  public  static  function  buildLocalMethodName ($ method
210+  {
211+  return  parent ::buildLocalMethodName ($ method
212+  }
213+  }
                         You can’t perform that action at this time. 
           
                  
0 commit comments