AbstractAdaptorTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of the DS Framework.
4
 *
5
 * (c) Dan Smith <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace Tests\Ds\Router\Adaptor;
11
12
use Ds\Router\Interfaces\AdaptorInterface;
13
use Ds\Router\Interfaces\SerializerInterface;
14
15
/**
16
 * Class AbstractAdaptorTest
17
 * @package Tests\Ds\Router\Adaptor
18
 */
19
class AbstractAdaptorTest extends \PHPUnit_Framework_TestCase
20
{
21
    /**
22
     * @var AdaptorInterface
23
     */
24
    public $adaptor;
25
26
    /**
27
     * @var \PHPUnit_Framework_MockObject_MockObject|SerializerInterface
28
     */
29
    public $serializer;
30
31
    /**
32
     *
33
     */
34
    public function setUp()
35
    {
36
        $this->serializer = $this->getMockBuilder(SerializerInterface::class)->getMock();
37
        $this->adaptor = new AbstractAdaptorMock($this->serializer);
38
    }
39
40
    /**
41
     *
42
     */
43
    public function testGetOptions()
44
    {
45
        $expected = [];
46
        $actual = $this->adaptor->getOptions();
47
        $this->assertEquals($expected, $actual);
48
    }
49
50
    /**
51
     *
52
     */
53
    public function testGetOption()
54
    {
55
        $expected = [];
56
        $actual = $this->adaptor->getOptions();
57
        $this->assertEquals($expected, $actual);
58
    }
59
60
    /**
61
     *
62
     */
63
    public function testWithOptions()
64
    {
65
        $expected = ['new' => 'options'];
66
        $this->adaptor->withOptions($expected);
67
        $actual = $this->adaptor->getOptions();
68
        $this->assertEquals($expected, $actual);
69
    }
70
}
71