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.
Passed
Push — master ( 07b164...660df5 )
by Kristjan
36s
created

ShifterShifterTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 2
c 2
b 1
f 0
lcom 1
cbo 5
dl 0
loc 29
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testReturnValuesFromInnerShifter() 0 14 1
A mockShifter() 0 7 1
1
<?php
2
3
namespace Tests\COG\ChronoShifter\Shifter;
4
5
use COG\ChronoShifter\Shifter\InnerShifter;
6
7
/**
8
 * @author Kristjan Siimson <[email protected]>
9
 * @package Shifter\Test
10
 */
11
class ShifterShifterTest extends \PHPUnit_Framework_TestCase
12
{
13
    public function testReturnValuesFromInnerShifter()
14
    {
15
        $shifter = $this->mockShifter();
16
        $shifter
17
            ->expects($this->any())
18
            ->method('shift')
19
            ->will($this->onConsecutiveCalls('2014-01-01', '2014-01-02', '2014-01-03'));
20
21
        $shifterShifter = new InnerShifter($shifter);
22
23
        $this->assertEquals('2014-01-01', $shifterShifter->shift('2011-01-01'));
24
        $this->assertEquals('2014-01-02', $shifterShifter->shift('2011-01-01'));
25
        $this->assertEquals('2014-01-03', $shifterShifter->shift('2011-01-01'));
26
    }
27
28
    /**
29
     * @uses COG\ChronoShifter\Shifter\Shifter
30
     * @return \PHPUnit_Framework_MockObject_MockObject
31
     */
32
    private function mockShifter()
33
    {
34
        return $this
35
            ->getMockBuilder('COG\ChronoShifter\Shifter\Shifter')
36
            ->setMethods(array('shift'))
37
            ->getMockForAbstractClass();
38
    }
39
}
40