Esempio n. 1
0
 public function testAccessors()
 {
     $option = new DefaultOption(CURLOPT_ENCODING);
     static::assertEquals(CURLOPT_ENCODING, $option->getOption());
     static::assertNull($option->getValue());
     $option->setValue(true);
     static::assertEquals(true, $option->getValue());
     $option->setValue(1);
     static::assertEquals(1, $option->getValue());
     $option->setValue('true');
     static::assertEquals('true', $option->getValue());
 }
Esempio n. 2
0
 /**
  * Create regex cURL option.
  *
  * @param int $option
  */
 public function __construct($option)
 {
     parent::__construct($option);
     $this->value = '';
 }