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.

DecrementTest::testCompareEqualDates()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 5
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Tests\COG\ChronoShifter\Evaluator;
4
5
use COG\ChronoShifter\Direction\Decreasing;
6
7
/**
8
 * @author Kristjan Siimson <[email protected]>
9
 * @package Direction\Tests
10
 */
11 View Code Duplication
class DecrementTest extends \PHPUnit_Framework_TestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
    /**
14
     * @uses COG\ChronoShifter\Period\Period
15
     */
16
    public function testNextMovesToPreviousPeriod()
17
    {
18
        $periodMock = $this
19
            ->getMockBuilder('COG\ChronoShifter\Period\Period')
20
            ->setMethods(array('previous'))
21
            ->getMockForAbstractClass();
22
23
        $periodMock->expects($this->once())->method('previous');
24
25
        $direction = new Decreasing();
26
        $direction->next($periodMock);
27
    }
28
29
    public function testCompareEqualDates()
30
    {
31
        $direction = new Decreasing();
32
        $this->assertEquals(0, $direction->compare('2014-01-01 00:23:23', '2014-01-01 00:25:25'));
33
    }
34
35
    public function testFirstDateAfterSecondDate()
36
    {
37
        $direction = new Decreasing();
38
        $this->assertEquals(-1, $direction->compare('2014-01-02 00:00:00', '2014-01-01 23:59:59'));
39
    }
40
41
    public function testSecondDateAfterFirstDate()
42
    {
43
        $direction = new Decreasing();
44
        $this->assertEquals(1, $direction->compare('2014-01-01 23:59:59', '2014-01-02 00:00:00'));
45
    }
46
}
47