Passed
Branch feature/static-formatter (adf5e0)
by Daniel
02:33
created

testCreateFormatter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
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
15
use PHPUnit\Framework\TestCase;
16
use RoadBunch\Csv\Formatter\Formatter;
17
use RoadBunch\Csv\Formatter\SplitCamelCaseWordsFormatter;
18
19
/**
20
 * Class SplitCamelCaseWordsFormatterTest
21
 *
22
 * @author  Dan McAdams
23
 * @package RoadBunch\Csv\Tests\Formatter
24
 */
25
class SplitCamelCaseWordsFormatterTest extends TestCase
26
{
27
    public function testSplitCamelCase()
28
    {
29
        $ccHeader = ['', 'stay_the_same', 'TestStringOne', 'TestStringTwo', 'TestABBRStrings', 'camelCase'];
30
        $expected = ['', 'stay_the_same', 'Test String One', 'Test String Two', 'Test ABBR Strings', 'camel Case'];
31
32
        $this->assertEquals($expected, SplitCamelCaseWordsFormatter::format($ccHeader));
33
    }
34
}
35