Passed
Push — master ( 6998a3...224daf )
by Daniel
02:08
created

SplitCamelCaseWordsFormatterTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 2
1
<?php declare(strict_types=1);
2
3
/**
4
 * This file is part of the Csv-Machine package.
5
 *
6
 * (c) Dan McAdams <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace RoadBunch\Csv\Tests\Formatter;
13
14
use PHPUnit\Framework\TestCase;
15
use RoadBunch\Csv\Formatter\AbstractFormatter;
16
use RoadBunch\Csv\Formatter\SplitCamelCaseWordsFormatter;
17
18
/**
19
 * Class SplitCamelCaseWordsFormatterTest
20
 *
21
 * @author  Dan McAdams
22
 * @package RoadBunch\Csv\Tests\Formatter
23
 */
24
class SplitCamelCaseWordsFormatterTest extends TestCase
25
{
26
    public function testSplitCamelCase()
27
    {
28
        $this->assertEquals(
29
            ['', 'stay_the_same', 'Test String One', 'Test String Two'],
30
            SplitCamelCaseWordsFormatter::format(['', 'stay_the_same', 'TestStringOne', 'TestStringTwo'])
31
        );
32
    }
33
34
    public function testSplitCamelCaseWithAcronym()
35
    {
36
        $this->assertEquals(
37
            ['the CSV Machine', 'Some NASA Stuff', 'Does T.H.I.S. Work...'],
38
            SplitCamelCaseWordsFormatter::format(['theCSVMachine', 'SomeNASAStuff', 'DoesT.H.I.S.Work...'])
39
        );
40
    }
41
}
42