@@ -27,7 +27,6 @@ |
||
| 27 | 27 | use Youshido\GraphQL\Type\Scalar\StringType; |
| 28 | 28 | use Youshido\GraphQL\Type\Union\UnionType; |
| 29 | 29 | use Youshido\GraphQL\Validator\ResolveValidator\ResolveValidator; |
| 30 | -use Youshido\Tests\DataProvider\TestEnumType; |
|
| 31 | 30 | use Youshido\Tests\DataProvider\TestInterfaceType; |
| 32 | 31 | use Youshido\Tests\DataProvider\TestObjectType; |
| 33 | 32 | use Youshido\Tests\DataProvider\TestUnionType; |
@@ -67,36 +67,36 @@ |
||
| 67 | 67 | |
| 68 | 68 | public function testValidFragmentTypeWithComposite() |
| 69 | 69 | { |
| 70 | - $validator = new ResolveValidator(new ExecutionContext(new TestSchema())); |
|
| 71 | - $userType = new ObjectType([ |
|
| 70 | + $validator = new ResolveValidator(new ExecutionContext(new TestSchema())); |
|
| 71 | + $userType = new ObjectType([ |
|
| 72 | 72 | 'name' => 'User', |
| 73 | 73 | 'fields' => [ |
| 74 | - 'name' => new StringType(), |
|
| 74 | + 'name' => new StringType(), |
|
| 75 | 75 | ], |
| 76 | 76 | 'interfaces' => [new TestInterfaceType()] |
| 77 | - ]); |
|
| 77 | + ]); |
|
| 78 | 78 | |
| 79 | - $fragment = new Fragment('name', 'User', []); |
|
| 80 | - $fragmentReference = new FragmentReference('name'); |
|
| 81 | - $validator->assertValidFragmentForField($fragment, $fragmentReference, new NonNullType($userType)); |
|
| 79 | + $fragment = new Fragment('name', 'User', []); |
|
| 80 | + $fragmentReference = new FragmentReference('name'); |
|
| 81 | + $validator->assertValidFragmentForField($fragment, $fragmentReference, new NonNullType($userType)); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | public function testValidFragmentTypeWithUnion() |
| 85 | 85 | { |
| 86 | - $validator = new ResolveValidator(new ExecutionContext(new TestSchema())); |
|
| 86 | + $validator = new ResolveValidator(new ExecutionContext(new TestSchema())); |
|
| 87 | 87 | |
| 88 | - $unionType = new ObjectType([ |
|
| 88 | + $unionType = new ObjectType([ |
|
| 89 | 89 | 'name' => 'Mammals', |
| 90 | 90 | 'type' => new TestUnionType(), |
| 91 | 91 | 'resolve' => function ($value, $args, ResolveInfo $info) { |
| 92 | - $testObject = new TestObjectType(); |
|
| 93 | - return [$testObject->getData()]; |
|
| 92 | + $testObject = new TestObjectType(); |
|
| 93 | + return [$testObject->getData()]; |
|
| 94 | 94 | } |
| 95 | - ]); |
|
| 95 | + ]); |
|
| 96 | 96 | |
| 97 | - $fragment = new Fragment('name', 'TestObject', ['name']); |
|
| 98 | - $fragmentReference = new FragmentReference('name'); |
|
| 99 | - $validator->assertValidFragmentForField($fragment, $fragmentReference, $unionType); |
|
| 97 | + $fragment = new Fragment('name', 'TestObject', ['name']); |
|
| 98 | + $fragmentReference = new FragmentReference('name'); |
|
| 99 | + $validator->assertValidFragmentForField($fragment, $fragmentReference, $unionType); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |