Skip to content

Commit

Permalink
Fix conflicted test
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulhp committed Sep 21, 2023
1 parent 140b72d commit b7d7ca4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/Database/DatabaseQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1393,9 +1393,9 @@ public function testChunkPaginatesUsingIdWithLastChunkComplete(): void
$builder = $this->getMockQueryBuilder();
$builder->orders[] = ['column' => 'foobar', 'direction' => 'asc'];

$chunk1 = Collection::make([(object) ['someIdField' => 1], (object) ['someIdField' => 2]]);
$chunk2 = Collection::make([(object) ['someIdField' => 10], (object) ['someIdField' => 11]]);
$chunk3 = Collection::make([]);
$chunk1 = [(object) ['someIdField' => 1], (object) ['someIdField' => 2]];
$chunk2 = [(object) ['someIdField' => 10], (object) ['someIdField' => 11]];
$chunk3 = [];
$builder->shouldReceive('forPageAfterId')->once()->with(2, 0, 'someIdField')->andReturnSelf();
$builder->shouldReceive('forPageAfterId')->once()->with(2, 2, 'someIdField')->andReturnSelf();
$builder->shouldReceive('forPageAfterId')->once()->with(2, 11, 'someIdField')->andReturnSelf();
Expand All @@ -1416,8 +1416,8 @@ public function testChunkPaginatesUsingIdWithLastChunkPartial(): void
$builder = $this->getMockQueryBuilder();
$builder->orders[] = ['column' => 'foobar', 'direction' => 'asc'];

$chunk1 = Collection::make([(object) ['someIdField' => 1], (object) ['someIdField' => 2]]);
$chunk2 = Collection::make([(object) ['someIdField' => 10]]);
$chunk1 = [(object) ['someIdField' => 1], (object) ['someIdField' => 2]];
$chunk2 = [(object) ['someIdField' => 10]];
$builder->shouldReceive('forPageAfterId')->once()->with(2, 0, 'someIdField')->andReturnSelf();
$builder->shouldReceive('forPageAfterId')->once()->with(2, 2, 'someIdField')->andReturnSelf();
$builder->shouldReceive('get')->times(2)->andReturn($chunk1, $chunk2);
Expand All @@ -1436,7 +1436,7 @@ public function testChunkPaginatesUsingIdWithCountZero(): void
$builder = $this->getMockQueryBuilder();
$builder->orders[] = ['column' => 'foobar', 'direction' => 'asc'];

$chunk = Collection::make([]);
$chunk = [];
$builder->shouldReceive('forPageAfterId')->once()->with(0, 0, 'someIdField')->andReturnSelf();
$builder->shouldReceive('get')->times(1)->andReturn($chunk);

Expand All @@ -1453,8 +1453,8 @@ public function testChunkPaginatesUsingIdWithAlias(): void
$builder = $this->getMockQueryBuilder();
$builder->orders[] = ['column' => 'foobar', 'direction' => 'asc'];

$chunk1 = Collection::make([(object) ['table_id' => 1], (object) ['table_id' => 10]]);
$chunk2 = Collection::make([]);
$chunk1 = [(object) ['table_id' => 1], (object) ['table_id' => 10]];
$chunk2 = [];
$builder->shouldReceive('forPageAfterId')->once()->with(2, 0, 'table.id')->andReturnSelf();
$builder->shouldReceive('forPageAfterId')->once()->with(2, 10, 'table.id')->andReturnSelf();
$builder->shouldReceive('get')->times(2)->andReturn($chunk1, $chunk2);
Expand Down

0 comments on commit b7d7ca4

Please sign in to comment.