Exemple #1
0
 public function testSetOption()
 {
     $curl = new SingleCurl();
     $descriptor =& $curl->getDescriptor();
     $curl->setOption($descriptor, CURLOPT_TIMEOUT, 5);
     $this->assertEquals(5, $descriptor['option'][CURLOPT_TIMEOUT]);
     $curl->setOption($descriptor, CURLOPT_TIMEOUT);
     $this->assertEquals($curl->getDefaultOption(CURLOPT_TIMEOUT), $descriptor['option'][CURLOPT_TIMEOUT]);
 }