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
{{ message }}
Repository navigation
Commit 1300987
Browse filesBrowse the repository at this point in the historyBrowse files
$this->assertSame('SELECT * FROM "test"."dbo"."jobs" WITH (UPDLOCK, ROWLOCK) WHERE "id" > 3', str_replace("\n", '', $builder->getCompiledSelect(false)));
83
+
$this->assertSameSql($expectedSQL, $answer);
84
+
$this->assertSameSql('SELECT * FROM "test"."dbo"."jobs" WITH (UPDLOCK, ROWLOCK) WHERE "id" > 3', $builder->getCompiledSelect(false));
$this->assertSameSql('SELECT * FROM "test"."dbo"."jobs" WITH (UPDLOCK, ROWLOCK) WHERE "id" > 3 ORDER BY "id" DESC', $builder->getCompiledSelect(false));
@@ -150,11 +141,8 @@ public function testExistsWithGroupByAndHaving(): void
150
141
151
142
$expectedSQL = 'SELECT 1 FROM ( SELECT COUNT("id") AS "total" FROM "jobs" WHERE "id" > :id: GROUP BY "id" HAVING "total" > :total: ) CI_exists LIMIT 1';
$this->assertSameSql('SELECT * FROM (SELECT * FROM "jobs") "uwrp0" UNION SELECT * FROM (SELECT * FROM "jobs") "uwrp1"', $builder->getCompiledSelect(false));
192
174
}
193
175
194
176
publicfunctiontestExistsResetsByDefault(): void
@@ -198,7 +180,7 @@ public function testExistsResetsByDefault(): void
198
180
199
181
$builder->where('id >', 3)->exists();
200
182
201
-
$this->assertSame('SELECT * FROM "jobs"', str_replace("\n", '', $builder->getCompiledSelect(false)));
183
+
$this->assertSameSql('SELECT * FROM "jobs"', $builder->getCompiledSelect(false));
202
184
$this->assertSame([], $builder->getBinds());
203
185
}
204
186
@@ -209,7 +191,7 @@ public function testExistsHonorsResetFalse(): void
209
191
210
192
$builder->where('id >', 3)->exists(false);
211
193
212
-
$this->assertSame('SELECT * FROM "jobs" WHERE "id" > 3', str_replace("\n", '', $builder->getCompiledSelect(false)));
194
+
$this->assertSameSql('SELECT * FROM "jobs" WHERE "id" > 3', $builder->getCompiledSelect(false));
0 commit comments