예제 #1
0
 /**
  * Set request object
  *
  * @param CurlRequest $request
  */
 public function setRequest($request)
 {
     $this->request = $request;
     $options = $request->getOptions();
     $this->setOptions($options);
     if ($request->isVerbose()) {
         CurlDebug::printOptions($options);
     }
 }
예제 #2
0
 public function testGetOptionName()
 {
     $actual = CurlDebug::getOptionName(CURLOPT_URL);
     $expected = 'CURLOPT_URL';
     $this->assertEquals($expected, $actual);
     $actual = CurlDebug::getOptionName(CURLOPT_HEADER);
     $expected = 'CURLOPT_HEADER';
     $this->assertEquals($expected, $actual);
     $actual = CurlDebug::getOptionName(CURLOPT_POST);
     $expected = 'CURLOPT_POST';
     $this->assertEquals($expected, $actual);
 }
예제 #3
0
 /**
  * Show options
  */
 public function printOptions()
 {
     CurlDebug::printOptions($this->options);
 }