Skip to content

Commit

Permalink
Updated test
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Chaplinski committed Aug 23, 2024
1 parent ceb6d2a commit 48e55da
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/Support/SupportCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2010,19 +2010,19 @@ public function testNaturalSortByManyWithNull($collection)
{
$itemFoo = new \stdClass();
$itemFoo->first = 'f';
$itemFoo->second = 's';
$itemFoo->second = null;
$itemBar = new \stdClass();
$itemBar->first = 'f';
$itemBar->second = null;
$itemBar->second = 's';

$data = new $collection([$itemFoo, $itemBar]);
$data->sortBy([
['first', 'asc'],
['second', 'asc'],
$data = $data->sortBy([
['first', 'desc'],
['second', 'desc'],
], SORT_NATURAL);

$this->assertEquals($itemFoo, $data->first());
$this->assertEquals($itemBar, $data->get(2));
$this->assertEquals($itemBar, $data->first());
$this->assertEquals($itemFoo, $data->skip(1)->first());
}

#[DataProvider('collectionClassProvider')]
Expand Down

0 comments on commit 48e55da

Please sign in to comment.