Skip to content

Commit 6728659

Browse files
prefer new Collection over collect() (#55091)
1 parent 3d9a670 commit 6728659

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/Integration/Http/HttpClientTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function testGlobalMiddlewarePersistsBeforeWeDispatchEvent(): void
2121
Http::get('laravel.com');
2222

2323
Event::assertDispatched(RequestSending::class, function (RequestSending $event) {
24-
return Collection::make($event->request->header('User-Agent'))->contains('Facade/1.0');
24+
return (new Collection($event->request->header('User-Agent')))->contains('Facade/1.0');
2525
});
2626
}
2727

tests/Pagination/CursorPaginatorTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function testReturnEmptyCursorWhenItemsAreEmpty()
101101
{
102102
$cursor = new Cursor(['id' => 25], true);
103103

104-
$p = new CursorPaginator(Collection::make(), 25, $cursor, [
104+
$p = new CursorPaginator(new Collection, 25, $cursor, [
105105
'path' => 'http://website.com/test',
106106
'cursorName' => 'cursor',
107107
'parameters' => ['id'],

0 commit comments

Comments
 (0)