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

Completed
Pull Request — master (#237)
by Jérémiah
08:38
created

InheritanceTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Overblog\GraphQLBundle\Tests\Functional\Relay\Connection;
4
5
use Overblog\GraphQLBundle\Config\Processor\InheritanceProcessor;
6
use Overblog\GraphQLBundle\Tests\Functional\TestCase;
7
8
class InheritanceTest extends TestCase
9
{
10
    /** @var array */
11
    private $config;
12
13
    protected function setUp()
14
    {
15
        parent::setUp();
16
17
        static::bootKernel(['test_case' => 'inheritance']);
18
        $this->config = (array) static::$kernel->getContainer()->getParameter('overblog_graphql_types.config');
19
    }
20
21
    public function testObjectInheritance()
22
    {
23
        $this->assertArrayHasKey('Query', $this->config);
24
        $this->assertEquals(
25
            [
26
                'type' => 'object',
27
                InheritanceProcessor::INHERITS_KEY => ['QueryFoo', 'QueryBar', 'QueryHelloWord'],
28
                'decorator' => false,
29
                'config' => [
30
                    'fields' => [
31
                        'period' => [
32
                            'type' => 'Period',
33
                            'args' => [],
34
                        ],
35
                        'bar' => [
36
                            'type' => 'String',
37
                            'args' => [],
38
                        ],
39
                        'sayHello' => [
40
                            'type' => 'String',
41
                            'args' => [],
42
                        ],
43
                    ],
44
                    'interfaces' => ['QueryHelloWord'],
45
                    'name' => 'Query',
46
                ],
47
            ],
48
            $this->config['Query']
49
        );
50
    }
51
52
    public function testEnumInheritance()
53
    {
54
        $this->assertArrayHasKey('Period', $this->config);
55
        $this->assertEquals(
56
            [
57
                'type' => 'enum',
58
                InheritanceProcessor::INHERITS_KEY => ['Day', 'Month', 'Year'],
59
                'decorator' => false,
60
                'config' => [
61
                    'name' => 'Period',
62
                    'values' => [
63
                        'YEAR' => ['value' => 3],
64
                        'MONTH' => ['value' => 2],
65
                        'DAY' => ['value' => 1],
66
                    ],
67
                ],
68
            ],
69
            $this->config['Period']
70
        );
71
    }
72
73
    public function testDecoratorTypeShouldRemovedFromFinalConfig()
74
    {
75
        $this->assertArrayNotHasKey('QueryBarDecorator', $this->config);
76
        $this->assertArrayNotHasKey('QueryFooDecorator', $this->config);
77
    }
78
}
79