Skip to content

Commit

Permalink
Failing Test
Browse files Browse the repository at this point in the history
  • Loading branch information
TWithers committed Mar 8, 2024
1 parent f2bff1c commit d1602de
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/Support/SupportCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2036,6 +2036,14 @@ public function testSortByString($collection)
$this->assertEquals([['name' => 'taylor'], ['name' => 'dayle']], array_values($data->all()));
}

#[DataProvider('collectionClassProvider')]
public function testSortByStringDesc($collection)
{
$data = new $collection([['id' => 1, 'name' => 'foo'], ['id' => 2, 'name' => 'bar']]);
$data = $data->sortByDesc(['id']);
$this->assertEquals([['id' => 2, 'name' => 'bar'], ['id' => 1, 'name' => 'foo']], array_values($data->all()));
}

/**
* @dataProvider collectionClassProvider
*/
Expand Down

0 comments on commit d1602de

Please sign in to comment.