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

CellTest::testCellFormatting()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
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