Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | public function testItSetsDeprecationReasonToNullByDefault() |
||
9 | { |
||
10 | $schema = new Issue171Schema(); |
||
11 | $processor = new Processor($schema); |
||
12 | |||
13 | $processor->processPayload($this->getIntrospectionQuery(), []); |
||
14 | $resp = $processor->getResponseData(); |
||
15 | |||
16 | $enumTypes = array_filter($resp['data']['__schema']['types'], function($type){ |
||
17 | return ($type['kind'] === 'ENUM'); |
||
18 | }); |
||
19 | |||
20 | foreach ($enumTypes as $enumType) { |
||
21 | foreach ($enumType['enumValues'] as $value) { |
||
22 | $this->assertFalse($value['isDeprecated']); |
||
23 | $this->assertNull($value['deprecationReason'], "deprecationReason should have been null"); |
||
24 | } |
||
25 | } |
||
26 | } |
||
27 | |||
109 | } |