Passed
Push — master ( a32b7c...9671df )
by Andy
02:16
created

ArrayFormatterTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testFormatterReturnsArray() 0 9 1
1
<?php
2
3
namespace Palmtree\Csv\Test\Formatter;
4
5
use Palmtree\Csv\Formatter\ArrayFormatter;
6
use Palmtree\Csv\Formatter\NumberFormatter;
7
use PHPUnit\Framework\TestCase;
8
9
class ArrayFormatterTest extends TestCase
10
{
11
    public function testFormatterReturnsArray()
12
    {
13
        $formatter = new ArrayFormatter(new NumberFormatter(), ',');
14
15
        $value = $formatter->format('1,2,3');
16
17
        $this->assertTrue(is_array($value));
18
        $this->assertSame([1, 2, 3], $value);
19
    }
20
}
21