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
Pull Request — master (#237)
by Jérémiah
08:39
created

InheritanceTest::testEnumInheritance()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

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