Code Duplication    Length = 18-18 lines in 2 locations

Tests/Schema/ProcessorTest.php 2 locations

@@ 58-75 (lines=18) @@
55
56
    }
57
58
    public function testListNullResponse()
59
    {
60
        $processor = new Processor(new Schema([
61
            'query' => new ObjectType([
62
                'name' => 'RootQuery',
63
                'fields' => [
64
                    'list' => [
65
                        'type' => new ListType(new StringType()),
66
                        'resolve' => function() {
67
                            return null;
68
                        }
69
                    ]
70
                ]
71
            ])
72
        ]));
73
        $data = $processor->processPayload(' { list }')->getResponseData();
74
        $this->assertEquals(['data' => ['list' => null]], $data);
75
    }
76
77
78
    public function testSubscriptionNullResponse()
@@ 78-95 (lines=18) @@
75
    }
76
77
78
    public function testSubscriptionNullResponse()
79
    {
80
        $processor = new Processor(new Schema([
81
            'query' => new ObjectType([
82
                'name' => 'RootQuery',
83
                'fields' => [
84
                    'list' => [
85
                        'type' => new ListType(new StringType()),
86
                        'resolve' => function() {
87
                            return null;
88
                        }
89
                    ]
90
                ]
91
            ])
92
        ]));
93
        $data = $processor->processPayload(' { __schema { subscriptionType { name } } }')->getResponseData();
94
        $this->assertEquals(['data' => ['__schema' => ['subscriptionType' => null]]], $data);
95
    }
96
97
    public function testSchemaOperations()
98
    {