/** * 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); } }
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); }
/** * Show options */ public function printOptions() { CurlDebug::printOptions($this->options); }