@@ -54,9 +54,7 @@ public function testQueryWithoutFieldName()
54
54
$ query = new Query ();
55
55
56
56
$ this ->assertEquals (
57
- "query {
58
-
59
- } " ,
57
+ "query " ,
60
58
(string ) $ query
61
59
);
62
60
@@ -95,9 +93,7 @@ public function testQueryWithOperationName()
95
93
->setOperationName ('retrieveObject ' );
96
94
$ this ->assertEquals (
97
95
'query retrieveObject {
98
- Object {
99
-
100
- }
96
+ Object
101
97
} ' ,
102
98
(string ) $ query
103
99
);
@@ -118,9 +114,7 @@ public function testQueryWithOperationNameAndOperationType()
118
114
->setSelectionSet ([new Query ('Object ' )]);
119
115
$ this ->assertEquals (
120
116
'query retrieveObject {
121
- Object {
122
-
123
- }
117
+ Object
124
118
} ' ,
125
119
(string ) $ query
126
120
);
@@ -141,9 +135,7 @@ public function testQueryWithOperationNameInSecondLevelDoesNothing()
141
135
$ this ->assertEquals (
142
136
'query retrieveObject {
143
137
Object {
144
- Nested {
145
-
146
- }
138
+ Nested
147
139
}
148
140
} ' ,
149
141
(string ) $ query
@@ -174,9 +166,7 @@ public function testQueryWithOneVariable()
174
166
->setVariables ([new Variable ('var ' , 'String ' )]);
175
167
$ this ->assertEquals (
176
168
'query($var: String) {
177
- Object {
178
-
179
- }
169
+ Object
180
170
} ' ,
181
171
(string ) $ query
182
172
);
@@ -196,9 +186,7 @@ public function testQueryWithMultipleVariables()
196
186
->setVariables ([new Variable ('var ' , 'String ' ), new Variable ('intVar ' , 'Int ' , false , 4 )]);
197
187
$ this ->assertEquals (
198
188
'query($var: String $intVar: Int=4) {
199
- Object {
200
-
201
- }
189
+ Object
202
190
} ' ,
203
191
(string ) $ query
204
192
);
@@ -218,9 +206,7 @@ public function testQueryWithVariablesInSecondLevelDoesNothing()
218
206
$ this ->assertEquals (
219
207
'query($var: String $intVar: Int=4) {
220
208
Object {
221
- Nested {
222
-
223
- }
209
+ Nested
224
210
}
225
211
} ' ,
226
212
(string ) $ query
@@ -241,9 +227,7 @@ public function testQueryWithOperationNameAndVariables()
241
227
->setVariables ([new Variable ('var ' , 'String ' )]);
242
228
$ this ->assertEquals (
243
229
'query retrieveObject($var: String) {
244
- Object {
245
-
246
- }
230
+ Object
247
231
} ' ,
248
232
(string ) $ query
249
233
);
@@ -262,9 +246,7 @@ public function testEmptyQuery(Query $query)
262
246
{
263
247
$ this ->assertEquals (
264
248
"query {
265
- Object {
266
-
267
- }
249
+ Object
268
250
} " ,
269
251
(string ) $ query ,
270
252
'Incorrect empty query string '
@@ -306,9 +288,7 @@ public function testStringArgumentValue(Query $query)
306
288
$ query ->setArguments (['arg1 ' => 'value ' ]);
307
289
$ this ->assertEquals (
308
290
"query {
309
- Object(arg1: \"value \") {
310
-
311
- }
291
+ Object(arg1: \"value \")
312
292
} " ,
313
293
(string ) $ query ,
314
294
'Query has improperly formatted parameter list '
@@ -332,9 +312,7 @@ public function testIntegerArgumentValue(Query $query)
332
312
$ query ->setArguments (['arg1 ' => 23 ]);
333
313
$ this ->assertEquals (
334
314
"query {
335
- Object(arg1: 23) {
336
-
337
- }
315
+ Object(arg1: 23)
338
316
} " ,
339
317
(string ) $ query
340
318
);
@@ -357,9 +335,7 @@ public function testBooleanArgumentValue(Query $query)
357
335
$ query ->setArguments (['arg1 ' => true ]);
358
336
$ this ->assertEquals (
359
337
"query {
360
- Object(arg1: true) {
361
-
362
- }
338
+ Object(arg1: true)
363
339
} " ,
364
340
(string ) $ query
365
341
);
@@ -382,9 +358,7 @@ public function testNullArgumentValue(Query $query)
382
358
$ query ->setArguments (['arg1 ' => null ]);
383
359
$ this ->assertEquals (
384
360
"query {
385
- Object(arg1: null) {
386
-
387
- }
361
+ Object(arg1: null)
388
362
} "
389
363
, (string ) $ query
390
364
);
@@ -407,9 +381,7 @@ public function testArrayIntegerArgumentValue(Query $query)
407
381
$ query ->setArguments (['arg1 ' => [1 , 2 , 3 ]]);
408
382
$ this ->assertEquals (
409
383
"query {
410
- Object(arg1: [1, 2, 3]) {
411
-
412
- }
384
+ Object(arg1: [1, 2, 3])
413
385
} " ,
414
386
(string ) $ query
415
387
);
@@ -433,9 +405,7 @@ public function testJsonObjectArgumentValue(Query $query)
433
405
$ query ->setArguments (['obj ' => new RawObject ('{json_string_array: ["json value"]} ' )]);
434
406
$ this ->assertEquals (
435
407
"query {
436
- Object(obj: {json_string_array: [ \"json value \"]}) {
437
-
438
- }
408
+ Object(obj: {json_string_array: [ \"json value \"]})
439
409
} "
440
410
, (string ) $ query
441
411
);
@@ -458,9 +428,7 @@ public function testArrayStringArgumentValue(Query $query)
458
428
$ query ->setArguments (['arg1 ' => ['one ' , 'two ' , 'three ' ]]);
459
429
$ this ->assertEquals (
460
430
"query {
461
- Object(arg1: [ \"one \", \"two \", \"three \"]) {
462
-
463
- }
431
+ Object(arg1: [ \"one \", \"two \", \"three \"])
464
432
} " ,
465
433
(string ) $ query
466
434
);
@@ -485,9 +453,7 @@ public function testTwoOrMoreArguments(Query $query)
485
453
$ query ->setArguments (['arg1 ' => 'val1 ' , 'arg2 ' => 2 , 'arg3 ' => true ]);
486
454
$ this ->assertEquals (
487
455
"query {
488
- Object(arg1: \"val1 \" arg2: 2 arg3: true) {
489
-
490
- }
456
+ Object(arg1: \"val1 \" arg2: 2 arg3: true)
491
457
} " ,
492
458
(string ) $ query ,
493
459
'Query has improperly formatted parameter list '
@@ -715,4 +681,4 @@ public function testTwoLevelQueryWithInlineFragment(Query $query)
715
681
716
682
return $ query ;
717
683
}
718
- }
684
+ }
0 commit comments