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 ( 3fb9ca...8cc1d2 )
by Kristjan
03:55 queued 54s
created

testCurrentValuePassesValueFromInnerShifterToOuterShifter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 12
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
3
namespace Tests\COG\Iterator\InnerShifter;
4
5
use COG\ChronoShifter\Iterator\InnerChronoIterator;
6
7
/**
8
 * @author Kristjan Siimson <[email protected]>
9
 * @package Iterator\Test
10
 */
11
class InnerShifterTest extends \PHPUnit_Framework_TestCase
12
{
13
    public function testCurrentValuePassesValueFromInnerShifterToOuterShifter()
14
    {
15
        $innerShifter = $this->mockShifter();
16
        $innerShifter->expects($this->any())->method('shift')->will($this->returnValue('2015-01-02'));
17
18
        $outerShifter = $this->mockShifter();
19
        $outerShifter->expects($this->once())->method('shift')->with('2015-01-02');
20
21
        $iterator = new InnerChronoIterator($innerShifter, $outerShifter, '2011-11-11');
22
        $iterator->next();
23
        $iterator->current();
24
    }
25
26
    public function testNextReturnsValueFromOuterShifter()
27
    {
28
        $innerShifter = $this->mockShifter();
29
30
        $outerShifter = $this->mockShifter();
31
        $outerShifter->expects($this->once())->method('shift')->will($this->returnValue('2015-02-02'));
32
33
        $iterator = new InnerChronoIterator($innerShifter, $outerShifter, '2011-11-11');
34
        $iterator->next();
35
        $this->assertEquals('2015-02-02', $iterator->current());
36
    }
37
38
    /**
39
     * @return \PHPUnit_Framework_MockObject_MockObject
40
     */
41
    private function mockShifter()
42
    {
43
        return $this
44
            ->getMockBuilder('COG\ChronoShifter\Shifter\Shifter')
45
            ->setMethods(array('shift'))
46
            ->getMockForAbstractClass();
47
    }
48
}
49