Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Push — master ( b6fc5f...138f00 )
by Jérémiah
03:34
created

GlobalIdTest::testFromGlobalIdWithTypeEmpty()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the OverblogGraphQLBundle package.
5
 *
6
 * (c) Overblog <http://github.com/overblog/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Overblog\GraphQLBundle\Tests\Relay\Node;
13
14
use Overblog\GraphQLBundle\Relay\Node\GlobalId;
15
16
class GlobalIdTest extends \PHPUnit_Framework_TestCase
17
{
18
    public function testToGlobalId()
19
    {
20
        $globalId = GlobalId::toGlobalId('User', 15);
21
22
        $this->assertEquals(sprintf('User%s15', GlobalId::SEPARATOR), base64_decode($globalId));
23
    }
24
25
    public function testToGlobalIdWithTypeEmpty()
26
    {
27
        $globalId = GlobalId::toGlobalId('', 15);
28
29
        $this->assertEquals(sprintf('%s15', GlobalId::SEPARATOR), base64_decode($globalId));
30
    }
31
32
    public function testToGlobalIdWithIdEmpty()
33
    {
34
        $globalId = GlobalId::toGlobalId('User', null);
35
36
        $this->assertEquals(sprintf('User%s', GlobalId::SEPARATOR), base64_decode($globalId));
37
    }
38
39
    public function testToGlobalIdWithTypeAndIdEmpty()
40
    {
41
        $globalId = GlobalId::toGlobalId(null, null);
42
43
        $this->assertEquals(sprintf('%s', GlobalId::SEPARATOR), base64_decode($globalId));
44
    }
45
46
    public function testFromGlobalId()
47
    {
48
        $params = GlobalId::fromGlobalId('VXNlcjoxNQ==');
49
50
        $this->assertEquals(['type' => 'User', 'id' => 15], $params);
51
    }
52
53
    public function testFromGlobalIdWithTypeEmpty()
54
    {
55
        $params = GlobalId::fromGlobalId('OjE1=');
56
57
        $this->assertEquals(['type' => null, 'id' => 15], $params);
58
    }
59
60
    public function testFromGlobalIdWithIdEmpty()
61
    {
62
        $params = GlobalId::fromGlobalId('VXNlcjo=');
63
64
        $this->assertEquals(['type' => 'User', 'id' => null], $params);
65
    }
66
67
    public function testFromGlobalIdWithTypeAndIdEmpty()
68
    {
69
        $params = GlobalId::fromGlobalId('Og==');
70
71
        $this->assertEquals(['type' => null, 'id' => null], $params);
72
    }
73
}
74