Total Complexity | 2 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
24 | class UnderscoreToSpaceFormatterTest extends TestCase |
||
25 | { |
||
26 | public function testCreateFormatter() |
||
27 | { |
||
28 | $formatter = new UnderscoreToSpaceFormatter(); |
||
29 | $this->assertNotNull($formatter); |
||
30 | } |
||
31 | |||
32 | public function testReplacesUnderscoresWithSpaces() |
||
33 | { |
||
34 | $testLowerCaseHeader = ['first___name', 'last_name', 'email address']; |
||
35 | $testUpperCaseHeader = ['first name', 'last name', 'email address']; |
||
36 | |||
37 | $this->assertEquals($testUpperCaseHeader, UnderscoreToSpaceFormatter::format($testLowerCaseHeader)); |
||
38 | } |
||
39 | } |
||
40 |