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 ( 2e34c8...e05ce3 )
by Jérémiah
09:10
created

DefinitionTest::isDeprecated()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
1
<?php
2
3
namespace Overblog\GraphQLBundle\Tests\Functional\Security;
4
5
use GraphQL\Type\Definition\EnumType;
6
use GraphQL\Type\Definition\ObjectType;
7
use GraphQL\Type\Definition\Type;
8
use Overblog\GraphQLBundle\Tests\Functional\TestCase;
9
10
class DefinitionTest extends TestCase
11
{
12
    protected function setUp()
13
    {
14
        parent::setUp();
15
16
        static::bootKernel(['test_case' => 'definition']);
17
    }
18
19
    public function testDefinesEnumTypeWithDeprecatedValue()
20
    {
21
        /** @var EnumType $enumTypeWithDeprecatedValue */
22
        $enumTypeWithDeprecatedValue = $this->getType('EnumWithDeprecatedValue');
23
        $value = $enumTypeWithDeprecatedValue->getValues()[0];
24
        $this->assertEquals([
25
            'name' => 'foo',
26
            'description' => null,
27
            'deprecationReason' => 'Just because',
28
            'value' => 'foo',
29
        ],  $value->config);
30
        $this->assertTrue($value->isDeprecated());
31
    }
32
33
    public function testDefinesAnObjectTypeWithDeprecatedField()
34
    {
35
        /** @var ObjectType $TypeWithDeprecatedField */
36
        $TypeWithDeprecatedField = $this->getType('ObjectWithDeprecatedField');
37
        $field = $TypeWithDeprecatedField->getField('bar');
38
        $this->assertEquals(Type::string(), $field->getType());
39
        $this->assertTrue($field->isDeprecated());
40
        $this->assertEquals('A terrible reason', $field->deprecationReason);
41
        $this->assertEquals('bar', $field->name);
42
        $this->assertEquals([], $field->args);
43
    }
44
45
    private function getType($type)
46
    {
47
        return $this->getContainer()->get('overblog_graphql.type_resolver')->resolve($type);
48
    }
49
}
50