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

CellTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCellFormatting() 0 10 1
1
<?php
2
3
namespace Palmtree\Csv\Test\Cell;
4
5
use Palmtree\Csv\Cell\Cell;
6
use Palmtree\Csv\Formatter\BooleanFormatter;
7
use Palmtree\Csv\Formatter\NumberFormatter;
8
use PHPUnit\Framework\TestCase;
9
10
class CellTest extends TestCase
11
{
12
    public function testCellFormatting()
13
    {
14
        $cell = new Cell('1', new NumberFormatter());
15
        $this->assertSame(1, $cell->getValue());
16
        $this->assertSame('1', $cell->getRawValue());
17
18
        $cell = new Cell('true', new BooleanFormatter());
19
        $this->assertTrue($cell->getValue());
20
        $this->assertSame('true', $cell->getRawValue());
21
    }
22
}
23