ExcelGenericDateItemConverterTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testConvert() 0 4 1
A getConvertData() 0 13 1
1
<?php
2
namespace Mathielen\DataImport\ValueConverter;
3
4
class ExcelGenericDateItemConverterTest extends \PHPUnit_Framework_TestCase
5
{
6
7
    /**
8
     * @var ExcelGenericDateItemConverter
9
     */
10
    private $sut;
11
12
    protected function setUp()
13
    {
14
        $this->sut = new ExcelGenericDateItemConverter();
15
    }
16
17
    /**
18
     * @dataProvider getConvertData
19
     */
20
    public function testConvert($inputData, $expectedResult)
21
    {
22
        $this->assertEquals($expectedResult, $this->sut->convert($inputData));
23
    }
24
25
    public function getConvertData()
26
    {
27
        return array(
28
            array(
29
                0,
30
                null
31
            ),
32
            array(
33
                42338,
34
                '2015-11-30'
35
            )
36
        );
37
    }
38
39
}
40