Completed
Push — master ( d991f2...2b3b24 )
by Julián
04:04
created

OptionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 19
rs 10
1
<?php
2
3
/*
4
 * A PSR7 aware cURL client (https://github.com/juliangut/spiral).
5
 *
6
 * @license BSD-3-Clause
7
 * @link https://github.com/juliangut/spiral
8
 * @author Julián Gutiérrez <[email protected]>
9
 */
10
11
namespace Jgut\Spiral\Tests\Option;
12
13
use Jgut\Spiral\Option\Option;
14
15
/**
16
 * Default option tests.
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