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.
Completed
Push — master ( 936777...562b59 )
by Eric
06:38
created

ApiHelperTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 2
dl 0
loc 45
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the Ivory Google Map bundle package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ivory\GoogleMapBundle\Tests\Templating;
13
14
use Ivory\GoogleMap\Helper\ApiHelper as BaseApiHelper;
15
use Ivory\GoogleMapBundle\Templating\ApiHelper;
16
17
/**
18
 * @author GeLo <[email protected]>
19
 */
20
class ApiHelperTest extends \PHPUnit_Framework_TestCase
21
{
22
    /**
23
     * @var ApiHelper
24
     */
25
    private $apiHelper;
26
27
    /**
28
     * @var BaseApiHelper|\PHPUnit_Framework_MockObject_MockObject
29
     */
30
    private $innerApiHelper;
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    protected function setUp()
36
    {
37
        $this->innerApiHelper = $this->createApiHelperMock();
38
        $this->apiHelper = new ApiHelper($this->innerApiHelper);
39
    }
40
41
    public function testRender()
42
    {
43
        $this->innerApiHelper
44
            ->expects($this->once())
45
            ->method('render')
46
            ->with($this->identicalTo($objects = [new \stdClass()]))
47
            ->will($this->returnValue($result = 'result'));
48
49
        $this->assertSame($result, $this->apiHelper->render($objects));
50
    }
51
52
    public function testName()
53
    {
54
        $this->assertSame('ivory_google_api', $this->apiHelper->getName());
55
    }
56
57
    /**
58
     * @return \PHPUnit_Framework_MockObject_MockObject|BaseApiHelper
59
     */
60
    private function createApiHelperMock()
61
    {
62
        return $this->createMock(BaseApiHelper::class);
63
    }
64
}
65