Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class ReverseTest extends TestCase |
||
9 | { |
||
10 | public function testReverseArray() |
||
11 | { |
||
12 | $list = [1, 2, 3]; |
||
13 | $expect = [3, 2, 1]; |
||
14 | $actual = reverse()($list); |
||
15 | $this->assertEquals($expect, $actual); |
||
16 | } |
||
17 | |||
18 | public function testReverseEmptyArray() |
||
19 | { |
||
20 | $list = []; |
||
21 | $expect = []; |
||
22 | $actual = reverse()($list); |
||
23 | $this->assertEquals($expect, $actual); |
||
24 | } |
||
25 | |||
26 | public function testReverseString() |
||
27 | { |
||
28 | $list = 'abc'; |
||
29 | $expect = 'cba'; |
||
30 | $actual = reverse()($list); |
||
31 | $this->assertEquals($expect, $actual); |
||
32 | } |
||
33 | public function testReverseEmptyString() |
||
34 | { |
||
35 | $list = ''; |
||
36 | $expect = ''; |
||
37 | $actual = reverse()($list); |
||
38 | $this->assertEquals($expect, $actual); |
||
39 | } |
||
40 | |||
41 | public function testReverseUnsupportedType() |
||
45 | } |
||
46 | } |
||
47 |