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/DatabaseQueryBuilderTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2690,7 +2690,7 @@ public function testAggregateFunctions()
2690
2690
publicfunctiontestSqlServerExists()
2691
2691
{
2692
2692
$builder = $this->getSqlServerBuilder();
2693
-
$builder->getConnection()->shouldReceive('select')->once()->with('select top 1 1 [exists] from [users]', [], true)->andReturn([['exists' => 1]]);
2693
+
$builder->getConnection()->shouldReceive('select')->once()->with('select top 1 1 [exists] from [users] order by (SELECT 0)', [], true)->andReturn([['exists' => 1]]);
2694
2694
$results = $builder->from('users')->exists();
2695
2695
$this->assertTrue($results);
2696
2696
}
@@ -3856,7 +3856,7 @@ public function testSqlServerLimitsAndOffsets()
3856
3856
{
3857
3857
$builder = $this->getSqlServerBuilder();
3858
3858
$builder->select('*')->from('users')->take(10);
3859
-
$this->assertSame('select top 10 * from [users]', $builder->toSql());
3859
+
$this->assertSame('select top 10 * from [users] order by (SELECT 0)', $builder->toSql());
$this->assertSame('select * from [users] where [email] = ? order by (select top 1 [created_at] from [logins] where [users].[name] = ? and [user_id] = [users].[id]) asc offset 10 rows fetch next 10 rows only', $builder->toSql());
3878
+
$this->assertSame('select * from [users] where [email] = ? order by (select top 1 [created_at] from [logins] where [users].[name] = ? and [user_id] = [users].[id] order by (SELECT 0)) asc offset 10 rows fetch next 10 rows only', $builder->toSql());
0 commit comments