Total Complexity | 7 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
19 | class AdapterTest extends PHPUnit_Framework_TestCase |
||
20 | { |
||
21 | |||
22 | protected $registry; |
||
23 | protected $adapter; |
||
24 | |||
25 | protected function setUp(): void |
||
26 | { |
||
27 | $this->registry = new Registry(); |
||
28 | $this->adapter = new AnotherRegistryAdapter($this->registry); |
||
29 | } |
||
30 | |||
31 | public function testFirstValue() |
||
35 | } |
||
36 | |||
37 | public function testSecondValue() |
||
38 | { |
||
39 | $this->getRegistry()->setSecondValue('3.14'); |
||
40 | $this->assertEquals('3.14', $this->getRegistry()->getSecondValue()); |
||
41 | } |
||
42 | |||
43 | public function testAdaptFirstValue() |
||
44 | { |
||
45 | $this->getAdapter()->setFirstValue('FirstValue'); |
||
46 | $this->assertEquals(0, $this->getAdapter()->getFirstValue()); |
||
47 | } |
||
48 | |||
49 | public function testAdaptSecondValue() |
||
50 | { |
||
51 | $this->getAdapter()->setSecondValue('3.14'); |
||
52 | $this->assertEquals(3, $this->getAdapter()->getSecondValue()); |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @return mixed |
||
57 | */ |
||
58 | public function getRegistry() |
||
59 | { |
||
60 | return $this->registry; |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * @return mixed |
||
65 | */ |
||
66 | public function getAdapter() |
||
69 | } |
||
70 | } |
||
71 |