@@ -448,7 +448,7 @@ public function testSSLWithBadKey()
448448
449449 //--------------------------------------------------------------------
450450
451- public function testDebugOption ()
451+ public function testDebugOptionTrue ()
452452 {
453453 $ this ->request ->request ('get ' , 'http://example.com ' , [
454454 'debug ' => true ,
@@ -461,14 +461,35 @@ public function testDebugOption()
461461
462462 $ this ->assertArrayHasKey (CURLOPT_STDERR , $ options );
463463 $ this ->assertTrue (is_resource ($ options [CURLOPT_STDERR ]));
464+ }
464465
466+ public function testDebugOptionFalse ()
467+ {
465468 $ this ->request ->request ('get ' , 'http://example.com ' , [
466469 'debug ' => false ,
467470 ]);
468471
469472 $ options = $ this ->request ->curl_options ;
470473
471- $ this ->assertFalse ($ options [CURLOPT_STDERR ]);
474+ $ this ->assertArrayNotHasKey (CURLOPT_VERBOSE , $ options );
475+ $ this ->assertArrayNotHasKey (CURLOPT_STDERR , $ options );
476+ }
477+
478+ public function testDebugOptionFile ()
479+ {
480+ $ file = SUPPORTPATH . 'Files/baker/banana.php ' ;
481+
482+ $ this ->request ->request ('get ' , 'http://example.com ' , [
483+ 'debug ' => $ file ,
484+ ]);
485+
486+ $ options = $ this ->request ->curl_options ;
487+
488+ $ this ->assertArrayHasKey (CURLOPT_VERBOSE , $ options );
489+ $ this ->assertEquals (1 , $ options [CURLOPT_VERBOSE ]);
490+
491+ $ this ->assertArrayHasKey (CURLOPT_STDERR , $ options );
492+ $ this ->assertTrue (is_resource ($ options [CURLOPT_STDERR ]));
472493 }
473494
474495 //--------------------------------------------------------------------
0 commit comments