You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/Database/MutationValidationUniqueWithCustomRulesTests/MutationValidationUniqueWithCustomRulesTest.php
+6-3
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,8 @@ public function testUniquePassRulePass(): void
36
36
],
37
37
]);
38
38
39
-
$this->assertSqlQueries(<<<'SQL'
39
+
$this->assertSqlQueries(
40
+
<<<'SQL'
40
41
select count(*) as aggregate from "users" where "name" = ?;
41
42
SQL
42
43
);
@@ -72,7 +73,8 @@ public function testUniqueFailRulePass(): void
72
73
],
73
74
]);
74
75
75
-
$this->assertSqlQueries(<<<'SQL'
76
+
$this->assertSqlQueries(
77
+
<<<'SQL'
76
78
select count(*) as aggregate from "users" where "name" = ?;
77
79
SQL
78
80
);
@@ -143,7 +145,8 @@ public function testUniqueFailRuleFail(): void
143
145
],
144
146
]);
145
147
146
-
$this->assertSqlQueries(<<<'SQL'
148
+
$this->assertSqlQueries(
149
+
<<<'SQL'
147
150
select count(*) as aggregate from "users" where "name" = ?;
Copy file name to clipboardExpand all lines: tests/Database/SelectFields/AlwaysTests/AlwaysTest.php
+8-4
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,8 @@ public function testAlwaysSingleField(): void
44
44
45
45
$result = $this->graphql($query);
46
46
47
-
$this->assertSqlQueries(<<<'SQL'
47
+
$this->assertSqlQueries(
48
+
<<<'SQL'
48
49
select "posts"."body", "posts"."title", "posts"."id" from "posts";
49
50
select "comments"."id", "comments"."post_id", "comments"."body" from "comments" where "comments"."post_id" in (?) order by "comments"."id" asc;
50
51
SQL
@@ -99,7 +100,8 @@ public function testAlwaysSingleMultipleFieldInString(): void
99
100
100
101
$result = $this->graphql($query);
101
102
102
-
$this->assertSqlQueries(<<<'SQL'
103
+
$this->assertSqlQueries(
104
+
<<<'SQL'
103
105
select "posts"."body", "posts"."title", "posts"."id" from "posts";
104
106
select "comments"."id", "comments"."post_id", "comments"."body", "comments"."title" from "comments" where "comments"."post_id" in (?) order by "comments"."id" asc;
105
107
SQL
@@ -154,7 +156,8 @@ public function testAlwaysSingleMultipleFieldInArray(): void
154
156
155
157
$result = $this->graphql($query);
156
158
157
-
$this->assertSqlQueries(<<<'SQL'
159
+
$this->assertSqlQueries(
160
+
<<<'SQL'
158
161
select "posts"."body", "posts"."title", "posts"."id" from "posts";
159
162
select "comments"."id", "comments"."post_id", "comments"."body", "comments"."title" from "comments" where "comments"."post_id" in (?) order by "comments"."id" asc;
160
163
SQL
@@ -209,7 +212,8 @@ public function testAlwaysSameFieldTwice(): void
209
212
210
213
$result = $this->graphql($query);
211
214
212
-
$this->assertSqlQueries(<<<'SQL'
215
+
$this->assertSqlQueries(
216
+
<<<'SQL'
213
217
select "posts"."body", "posts"."title", "posts"."id" from "posts";
214
218
select "comments"."id", "comments"."post_id", "comments"."body" from "comments" where "comments"."post_id" in (?) order by "comments"."id" asc;
Copy file name to clipboardExpand all lines: tests/Database/SelectFields/InterfaceTests/InterfaceTest.php
+16-8
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,8 @@ public function testGeneratedSqlQuery(): void
34
34
35
35
$result = $this->graphql($graphql);
36
36
37
-
$this->assertSqlQueries(<<<'SQL'
37
+
$this->assertSqlQueries(
38
+
<<<'SQL'
38
39
select "title" from "posts";
39
40
SQL
40
41
);
@@ -79,7 +80,8 @@ public function testGeneratedRelationSqlQuery(): void
79
80
80
81
$result = $this->graphql($graphql);
81
82
82
-
$this->assertSqlQueries(<<<'SQL'
83
+
$this->assertSqlQueries(
84
+
<<<'SQL'
83
85
select "id", "title" from "posts";
84
86
select "comments"."title", "comments"."post_id", "comments"."id" from "comments" where "comments"."post_id" in (?) and "id" >= ? order by "comments"."id" asc;
85
87
SQL
@@ -141,14 +143,16 @@ public function testGeneratedInterfaceFieldSqlQuery(): void
141
143
$result = $this->graphql($graphql);
142
144
143
145
if (Application::VERSION < '5.6') {
144
-
$this->assertSqlQueries(<<<'SQL'
146
+
$this->assertSqlQueries(
147
+
<<<'SQL'
145
148
select "users"."id" from "users";
146
149
select "likes"."likable_id", "likes"."likable_type", "likes"."user_id", "likes"."id" from "likes" where "likes"."user_id" in (?);
147
150
select * from "posts" where "posts"."id" in (?);
148
151
SQL
149
152
);
150
153
} else {
151
-
$this->assertSqlQueries(<<<'SQL'
154
+
$this->assertSqlQueries(
155
+
<<<'SQL'
152
156
select "users"."id" from "users";
153
157
select "likes"."likable_id", "likes"."likable_type", "likes"."user_id", "likes"."id" from "likes" where "likes"."user_id" in (?);
154
158
select "id", "title" from "posts" where "posts"."id" in (?);
@@ -223,15 +227,17 @@ public function testGeneratedInterfaceFieldWithRelationSqlQuery(): void
223
227
$result = $this->graphql($graphql);
224
228
225
229
if (Application::VERSION < '5.6') {
226
-
$this->assertSqlQueries(<<<'SQL'
230
+
$this->assertSqlQueries(
231
+
<<<'SQL'
227
232
select "users"."id" from "users";
228
233
select "likes"."likable_id", "likes"."likable_type", "likes"."user_id", "likes"."id" from "likes" where "likes"."user_id" in (?, ?);
229
234
select * from "posts" where "posts"."id" in (?);
230
235
select "likes"."id", "likes"."likable_id", "likes"."likable_type" from "likes" where "likes"."likable_id" in (?) and "likes"."likable_type" = ? and 0=0;
231
236
SQL
232
237
);
233
238
} else {
234
-
$this->assertSqlQueries(<<<'SQL'
239
+
$this->assertSqlQueries(
240
+
<<<'SQL'
235
241
select "users"."id" from "users";
236
242
select "likes"."likable_id", "likes"."likable_type", "likes"."user_id", "likes"."id" from "likes" where "likes"."user_id" in (?, ?);
237
243
select "id", "title" from "posts" where "posts"."id" in (?);
@@ -334,15 +340,17 @@ public function testGeneratedInterfaceFieldWithRelationAndCustomQueryOnInterface
334
340
$result = $this->graphql($graphql);
335
341
336
342
if (Application::VERSION < '5.6') {
337
-
$this->assertSqlQueries(<<<'SQL'
343
+
$this->assertSqlQueries(
344
+
<<<'SQL'
338
345
select "users"."id" from "users";
339
346
select "likes"."likable_id", "likes"."likable_type", "likes"."user_id", "likes"."id" from "likes" where "likes"."user_id" in (?, ?);
340
347
select * from "comments" where "comments"."id" in (?);
341
348
select "likes"."id", "likes"."likable_id", "likes"."likable_type" from "likes" where "likes"."likable_id" in (?) and "likes"."likable_type" = ? and 1=1;
342
349
SQL
343
350
);
344
351
} else {
345
-
$this->assertSqlQueries(<<<'SQL'
352
+
$this->assertSqlQueries(
353
+
<<<'SQL'
346
354
select "users"."id" from "users";
347
355
select "likes"."likable_id", "likes"."likable_type", "likes"."user_id", "likes"."id" from "likes" where "likes"."user_id" in (?, ?);
348
356
select "id", "title" from "comments" where "comments"."id" in (?);
0 commit comments