| 1 | <?php |
||
| 17 | */ |
||
| 18 | class OptionTest extends \PHPUnit_Framework_TestCase |
||
| 19 | { |
||
| 20 | public function testAccessors() |
||
| 21 | { |
||
| 22 | $option = new Option(CURLOPT_ENCODING); |
||
| 23 | |||
| 24 | static::assertEquals(CURLOPT_ENCODING, $option->getOption()); |
||
| 25 | static::assertNull($option->getValue()); |
||
| 26 | |||
| 27 | $option->setValue(true); |
||
| 28 | static::assertEquals(true, $option->getValue()); |
||
| 29 | |||
| 30 | $option->setValue(1); |
||
| 31 | static::assertEquals(1, $option->getValue()); |
||
| 32 | |||
| 33 | $option->setValue('true'); |
||
| 34 | static::assertEquals('true', $option->getValue()); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |