Skip to content

Commit abdb064

Browse files
committed
Use correct column name in cursor where clause
1 parent bbfde17 commit abdb064

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Database/DatabaseQueryBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5325,7 +5325,7 @@ public function testCursorPaginateWithMultipleUnionsAndMultipleWheres()
53255325

53265326
$builder->shouldReceive('get')->once()->andReturnUsing(function () use ($builder, $results, $ts) {
53275327
$this->assertEquals(
5328-
'(select "id", "start_time" as "created_at", \'video\' as type from "videos" where ("start_time" > ?)) union (select "id", "created_at", \'news\' as type from "news" where "extra" = ? and ("start_time" > ?)) union (select "id", "created_at", \'podcast\' as type from "podcasts" where "extra" = ? and ("start_time" > ?)) order by "created_at" asc limit 17',
5328+
'(select "id", "start_time" as "created_at", \'video\' as type from "videos" where ("start_time" > ?)) union (select "id", "created_at", \'news\' as type from "news" where "extra" = ? and ("created_at" > ?)) union (select "id", "created_at", \'podcast\' as type from "podcasts" where "extra" = ? and ("created_at" > ?)) order by "created_at" asc limit 17',
53295329
$builder->toSql());
53305330
$this->assertEquals([$ts], $builder->bindings['where']);
53315331
$this->assertEquals(['first', $ts, 'second', $ts], $builder->bindings['union']);

0 commit comments

Comments
 (0)