Skip to content

Commit

Permalink
Delete CbpStrategy sortParams()
Browse files Browse the repository at this point in the history
  • Loading branch information
ecoologic committed Nov 17, 2023
1 parent 685ea92 commit 09146f4
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,6 @@ public function testFetchesCbpWithParams()
], $mockTickets->params);
}

public function testCorrectsParamsToCbp()
{
$mockTickets = new MockResource('tickets', [
[['id' => 1], ['id' => 2]],
[['id' => 3], ['id' => 4]]
]);
$strategy = new CbpStrategy('tickets', ['per_page' => 2, 'sort_by' => 'id', 'sort_order' => 'desc']);
$iterator = new PaginationIterator($mockTickets, $strategy, 'findAll');

iterator_to_array($iterator);

$this->assertEquals([
'sort' => '-id',
'page[size]' => 2, 'page[after]' => 'cursor_for_next_page'
], $mockTickets->params);
}

public function testFetchesSinglePageWithParams()
{
$resultsKey = 'results';
Expand Down

0 comments on commit 09146f4

Please sign in to comment.