Passed
Push — dev ( 41d3cd...077822 )
by Mattia
08:00
created

DateTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A unixTimeStampsDataProvider() 0 5 1
A shouldHumanizeTimestamp() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
class DateTest extends TestCase
6
{
7
    public function unixTimeStampsDataProvider(): array
8
    {
9
        return [
10
            [1576625018, '12/17/2019'],
11
            [0, 'Never'],
12
        ];
13
    }
14
15
    /**
16
     * @test
17
     * @dataProvider unixTimeStampsDataProvider
18
     */
19
    public function shouldHumanizeTimestamp($timestamp, $expected): void
20
    {
21
        $this->assertEquals($expected, \App\Helpers\Date::humanizeTimestamp($timestamp));
22
    }
23
}
24