@@ -82,7 +82,7 @@ public function testDefaultPagination(): void
82
82
$ this ->videos ->method ('defaultPagination ' )->willReturn (['limit ' => '3 ' ]);
83
83
84
84
$ videos = Video::factory ()->count (5 )->create ([
85
- 'created_at ' => fn () => $ this ->faker ->dateTime ,
85
+ 'created_at ' => fn () => $ this ->faker ->dateTime () ,
86
86
])->sortByDesc ('created_at ' )->values ();
87
87
88
88
$ expected = $ videos ->take (3 );
@@ -191,7 +191,7 @@ public function testNoPages(): void
191
191
public function testOnlyLimit (): void
192
192
{
193
193
$ videos = Video::factory ()->count (5 )->create ([
194
- 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime ,
194
+ 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime () ,
195
195
])->sortByDesc ('created_at ' )->values ();
196
196
197
197
$ meta = [
@@ -213,7 +213,7 @@ public function testOnlyLimit(): void
213
213
public function testBefore (): void
214
214
{
215
215
$ videos = Video::factory ()->count (10 )->create ([
216
- 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime ,
216
+ 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime () ,
217
217
])->sortByDesc ('created_at ' )->values ();
218
218
219
219
$ expected = [$ videos [4 ], $ videos [5 ], $ videos [6 ]];
@@ -242,7 +242,7 @@ public function testBeforeAscending(): void
242
242
$ this ->paginator ->withAscending ();
243
243
244
244
$ videos = Video::factory ()->count (10 )->create ([
245
- 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime ,
245
+ 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime () ,
246
246
])->sortBy ('created_at ' )->values ();
247
247
248
248
$ expected = [$ videos [4 ], $ videos [5 ], $ videos [6 ]];
@@ -307,14 +307,14 @@ public function testBeforeDoesNotExist(): void
307
307
$ this ->expectExceptionMessage ('does not exist ' );
308
308
309
309
$ this ->videos ->repository ()->queryAll ()->paginate ([
310
- 'before ' => $ this ->faker ->uuid ,
310
+ 'before ' => $ this ->faker ->uuid () ,
311
311
]);
312
312
}
313
313
314
314
public function testAfter (): void
315
315
{
316
316
$ videos = Video::factory ()->count (10 )->create ([
317
- 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime ,
317
+ 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime () ,
318
318
])->sortByDesc ('created_at ' )->values ();
319
319
320
320
$ expected = [$ videos [4 ], $ videos [5 ], $ videos [6 ]];
@@ -343,7 +343,7 @@ public function testAfterAscending(): void
343
343
$ this ->paginator ->withAscending ();
344
344
345
345
$ videos = Video::factory ()->count (10 )->create ([
346
- 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime ,
346
+ 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime () ,
347
347
])->sortBy ('created_at ' )->values ();
348
348
349
349
$ expected = [$ videos [4 ], $ videos [5 ], $ videos [6 ]];
@@ -370,7 +370,7 @@ public function testAfterAscending(): void
370
370
public function testAfterWithoutMore (): void
371
371
{
372
372
$ videos = Video::factory ()->count (4 )->create ([
373
- 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime ,
373
+ 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime () ,
374
374
])->sortByDesc ('created_at ' )->values ();
375
375
376
376
$ expected = [$ videos [2 ], $ videos [3 ]];
@@ -434,7 +434,7 @@ public function testAfterWithCustomKeys(): void
434
434
->withLimitKey ('per-page ' );
435
435
436
436
$ videos = Video::factory ()->count (6 )->create ([
437
- 'created_at ' => fn () => $ this ->faker ->dateTime ,
437
+ 'created_at ' => fn () => $ this ->faker ->dateTime () ,
438
438
])->sortByDesc ('created_at ' )->values ();
439
439
440
440
$ expected = [$ videos [2 ], $ videos [3 ], $ videos [4 ]];
@@ -493,7 +493,7 @@ public function testAfterDoesNotExist(): void
493
493
$ this ->expectExceptionMessage ('does not exist ' );
494
494
495
495
$ this ->videos ->repository ()->queryAll ()->paginate ([
496
- 'after ' => $ this ->faker ->uuid ,
496
+ 'after ' => $ this ->faker ->uuid () ,
497
497
]);
498
498
}
499
499
@@ -503,7 +503,7 @@ public function testAfterDoesNotExist(): void
503
503
public function testBeforeAndAfter (): void
504
504
{
505
505
$ videos = Video::factory ()->count (6 )->create ([
506
- 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime ,
506
+ 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime () ,
507
507
])->sortByDesc ('created_at ' )->values ();
508
508
509
509
$ expected = [$ videos [2 ], $ videos [3 ], $ videos [4 ]];
@@ -537,7 +537,7 @@ public function testSameColumnAndIdentifier(): void
537
537
$ this ->paginator ->withCursorColumn ('uuid ' );
538
538
539
539
$ videos = Video::factory ()->count (6 )->create ([
540
- 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime ,
540
+ 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime () ,
541
541
])->sortByDesc ('uuid ' )->values ();
542
542
543
543
$ expected = [$ videos [1 ], $ videos [2 ], $ videos [3 ]];
@@ -567,7 +567,7 @@ public function testSnakeCaseMetaAndCustomMetaKey(): void
567
567
$ this ->paginator ->withMetaKey ('cursor ' )->withSnakeCaseMeta ();
568
568
569
569
$ videos = Video::factory ()->count (6 )->create ([
570
- 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime ,
570
+ 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime () ,
571
571
])->sortByDesc ('created_at ' )->values ();
572
572
573
573
$ expected = [$ videos [1 ], $ videos [2 ], $ videos [3 ]];
@@ -593,7 +593,7 @@ public function testDashCaseMeta(): void
593
593
$ this ->paginator ->withDashCaseMeta ();
594
594
595
595
$ videos = Video::factory ()->count (6 )->create ([
596
- 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime ,
596
+ 'created_at ' => fn () => $ this ->faker ->unique ()->dateTime () ,
597
597
])->sortByDesc ('created_at ' )->values ();
598
598
599
599
$ expected = [$ videos [1 ], $ videos [2 ], $ videos [3 ]];
@@ -622,7 +622,7 @@ public function testColumn(): void
622
622
$ this ->paginator ->withCursorColumn ('updated_at ' );
623
623
624
624
$ videos = Video::factory ()->count (6 )->create ([
625
- 'updated_at ' => fn () => $ this ->faker ->unique ()->dateTime ,
625
+ 'updated_at ' => fn () => $ this ->faker ->unique ()->dateTime () ,
626
626
])->sortByDesc ('updated_at ' )->values ();
627
627
628
628
$ expected = [$ videos [1 ], $ videos [2 ], $ videos [3 ]];
@@ -654,7 +654,7 @@ public function testItUsesModelDefaultPerPage(): void
654
654
$ expected = (new Video ())->getPerPage ();
655
655
656
656
$ videos = Video::factory ()->count ($ expected + 5 )->create ([
657
- 'created_at ' => fn () => $ this ->faker ->dateTime ,
657
+ 'created_at ' => fn () => $ this ->faker ->dateTime () ,
658
658
])->sortByDesc ('created_at ' )->values ();
659
659
660
660
$ meta = [
@@ -683,7 +683,7 @@ public function testItUsesDefaultPerPage(): void
683
683
$ this ->paginator ->withDefaultPerPage ($ expected );
684
684
685
685
$ videos = Video::factory ()->count ($ expected + 5 )->create ([
686
- 'created_at ' => fn () => $ this ->faker ->dateTime ,
686
+ 'created_at ' => fn () => $ this ->faker ->dateTime () ,
687
687
])->sortByDesc ('created_at ' )->values ();
688
688
689
689
$ meta = [
@@ -707,7 +707,7 @@ public function testItCanRemoveMeta(): void
707
707
$ this ->paginator ->withoutMeta ();
708
708
709
709
$ videos = Video::factory ()->count (4 )->create ([
710
- 'created_at ' => fn () => $ this ->faker ->dateTime ,
710
+ 'created_at ' => fn () => $ this ->faker ->dateTime () ,
711
711
])->sortByDesc ('created_at ' )->values ();
712
712
713
713
$ links = $ this ->createLinks ($ videos [0 ], $ videos [2 ], 3 );
0 commit comments