GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

DayOfMonthIncrementTest::shiftProvider()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 1 Features 1
Metric Value
c 3
b 1
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Tests\COG\ChronoShifter\Shifter;
4
5
use COG\ChronoShifter\Direction\Increasing;
6
use COG\ChronoShifter\Period\Month;
7
use COG\ChronoShifter\Selector\Specific;
8
use COG\ChronoShifter\Shifter\ChronoShifter;
9
10
/**
11
 * @author Kristjan Siimson <[email protected]>
12
 * @package Shifter\Test
13
 */
14
class DayOfMonthIncrementTest extends \PHPUnit_Framework_TestCase
15
{
16
    /**
17
     * @var array
18
     */
19
    private $fixture = array(
20
        array(
21
            1, // Specific day
22
            '2015-01-01', // Starting time
23
            '2015-02-01'  // Expected time
24
        ),
25
        array(
26
            1, // Specific day
27
            '2014-01-01 15:12:24', // Starting time
28
            '2014-02-01'  // Expected time
29
        ),
30
        array(
31
            15, // Specific day
32
            '2014-04-14', // Starting time
33
            '2014-04-15'  // Expected time
34
        ),
35
        array(
36
            31, // Specific day
37
            '2015-03-01', // Starting time
38
            '2015-03-31'  // Expected time
39
        ),
40
        array(
41
            31, // Specific day
42
            '2015-02-01', // Starting time
43
            '2015-02-28'  // Expected time
44
        ),
45
        array(
46
            31, // Specific day
47
            '2016-02-01', // Starting time
48
            '2016-02-29'  // Expected time
49
        ),
50
        array(
51
            31, // Specific day
52
            '2016-08-31', // Starting time
53
            '2016-09-30'  // Expected time
54
        ),
55
        array(
56
            31, // Specific day
57
            '2016-12-31', // Starting time
58
            '2017-01-31'
59
        )
60
    );
61
62
    /**
63
     * @dataProvider shiftProvider
64
     * @param integer $day
65
     * @param string $start
66
     * @param string $expected
67
     */
68
    public function testShift($day, $start, $expected)
69
    {
70
        $shifter = new ChronoShifter(new Month($start), new Specific(new Increasing(), $day));
71
        $result = $shifter->shift($start);
72
73
        $this->assertEquals(
74
            $expected,
75
            $result,
76
            sprintf(
77
                'From %s to next day of month = %d',
78
                $start,
79
                $day
80
            )
81
        );
82
    }
83
84
    /**
85
     * @return array
86
     */
87
    public function shiftProvider()
88
    {
89
        return $this->fixture;
90
    }
91
}
92