@@ 10-18 (lines=9) @@ | ||
7 | ||
8 | class CsvTest extends PHPUnit_Framework_TestCase |
|
9 | { |
|
10 | public function testRemoveOneLastLine() |
|
11 | { |
|
12 | $csvArray = $this->getCsvArray(); |
|
13 | ||
14 | $csvHelper = new Csv(); |
|
15 | $result = $csvHelper->removeLastLines($csvArray); |
|
16 | ||
17 | $this->assertEquals((count($csvArray) - 1), count($result)); |
|
18 | } |
|
19 | ||
20 | public function testRemoveTwoLastLine() |
|
21 | { |
|
@@ 20-28 (lines=9) @@ | ||
17 | $this->assertEquals((count($csvArray) - 1), count($result)); |
|
18 | } |
|
19 | ||
20 | public function testRemoveTwoLastLine() |
|
21 | { |
|
22 | $csvArray = $this->getCsvArray(); |
|
23 | ||
24 | $csvHelper = new Csv(); |
|
25 | $result = $csvHelper->removeLastLines($csvArray, 2); |
|
26 | ||
27 | $this->assertEquals((count($csvArray) - 2), count($result)); |
|
28 | } |
|
29 | ||
30 | public function testFixDate() |
|
31 | { |
|
@@ 77-84 (lines=8) @@ | ||
74 | $this->assertEquals($expectedResult, $result); |
|
75 | } |
|
76 | ||
77 | public function testRemoveAllHeadersInCount() |
|
78 | { |
|
79 | $csvArray = $this->getCsvArray(); |
|
80 | $csvHelper = new Csv(); |
|
81 | $result = $csvHelper->removeHeaders($csvArray); |
|
82 | ||
83 | $this->assertEquals((count($csvArray) - 11), count($result)); |
|
84 | } |
|
85 | ||
86 | public function testRemoveFileHeadersAsCount() |
|
87 | { |
|
@@ 86-93 (lines=8) @@ | ||
83 | $this->assertEquals((count($csvArray) - 11), count($result)); |
|
84 | } |
|
85 | ||
86 | public function testRemoveFileHeadersAsCount() |
|
87 | { |
|
88 | $csvArray = $this->getCsvArray(); |
|
89 | $csvHelper = new Csv(); |
|
90 | $result = $csvHelper->removeHeaders($csvArray, false); |
|
91 | ||
92 | $this->assertEquals((count($csvArray) - 10), count($result)); |
|
93 | } |
|
94 | ||
95 | public function testArrayToCsvLine() |
|
96 | { |