File tree Expand file tree Collapse file tree 2 files changed +11
-22
lines changed Expand file tree Collapse file tree 2 files changed +11
-22
lines changed Original file line number Diff line number Diff line change @@ -38,25 +38,20 @@ public function testMutation() {
38
38
$ this ->specify ('tests validation ' , function () {
39
39
$ query = 'mutation { user(id: 1, with: { name: "la" }) { id, name } } ' ;
40
40
$ this ->assertGraphQLEquals ($ query , [
41
- 'data ' => [
42
- 'user ' => null
43
- ],
44
41
'errors ' => [
45
42
[
46
43
'message ' => 'validation ' ,
47
- 'locations ' => [
48
- [
49
- 'line ' => 1 ,
50
- 'column ' => 12 ,
51
- ],
52
- ],
44
+ 'category ' => 'graphql ' ,
53
45
'validation ' => [
54
46
'name ' => [
55
47
'The name must be between 3 and 10 characters. '
56
48
]
57
49
]
58
50
]
59
- ]
51
+ ],
52
+ 'data ' => [
53
+ 'user ' => null
54
+ ],
60
55
]);
61
56
});
62
57
@@ -408,8 +403,7 @@ public function testMutationCustomInputFieldException() {
408
403
. ' name_uppercase: "badvalue" }) { id, name } } ' ;
409
404
410
405
$ data = $ this ->executeGraphQL ($ query );
411
-
412
- $ this ->assertSame ("it's a bad value " , $ data ['errors ' ][0 ]['message ' ]);
406
+ $ this ->assertSame ("Internal server error " , $ data ['errors ' ][0 ]['message ' ]);
413
407
});
414
408
}
415
409
}
Original file line number Diff line number Diff line change @@ -175,20 +175,15 @@ public function testAuthorizeChecking() {
175
175
$ query = 'query { unauthorized } ' ;
176
176
177
177
$ this ->assertGraphQLEquals ($ query , [
178
- 'data ' => [
179
- 'unauthorized ' => null
180
- ],
181
178
'errors ' => [
182
179
[
183
180
'message ' => 'UNAUTHORIZED ' ,
184
- 'locations ' => [
185
- [
186
- 'line ' => 1 ,
187
- 'column ' => 9
188
- ]
189
- ]
181
+ 'category ' => 'graphql '
190
182
]
191
- ]
183
+ ],
184
+ 'data ' => [
185
+ 'unauthorized ' => null
186
+ ],
192
187
]);
193
188
});
194
189
}
You can’t perform that action at this time.
0 commit comments