| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function testInvalidParams() |
||
| 19 | { |
||
| 20 | $fieldConfig = new FieldConfig([ |
||
| 21 | 'name' => 'FirstName', |
||
| 22 | 'type' => new StringType(), |
||
| 23 | 'resolve' => function ($value, $args = [], $type = null) { |
||
| 24 | return 'John'; |
||
| 25 | } |
||
| 26 | ]); |
||
| 27 | |||
| 28 | $this->assertEquals('FirstName', $fieldConfig->getName()); |
||
| 29 | $this->assertEquals(new StringType(), $fieldConfig->getType()); |
||
| 30 | |||
| 31 | $resolveFunction = $fieldConfig->getResolveFunction(); |
||
| 32 | $this->assertEquals('John', $resolveFunction([])); |
||
| 33 | } |
||
| 34 | |||
| 36 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.