We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 911b637 commit 11f1ad2Copy full SHA for 11f1ad2
1 file changed
tests/Unit/SizeSorter/Items/EmptyListTest.php
@@ -0,0 +1,18 @@
1
+<?php
2
+
3
+declare(strict_types=1);
4
5
+use DragonCode\SizeSorter\SizeSorter;
6
+use Illuminate\Support\Collection;
7
8
+test('array', function () {
9
+ $actual = SizeSorter::items([])->sort()->all();
10
11
+ expect($actual)->toBeEmpty()->toBe([]);
12
+});
13
14
+test('collection', function () {
15
+ $actual = SizeSorter::items(new Collection())->sort()->all();
16
17
18
0 commit comments