getConvertData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

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