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 6cc7fac commit 68787d7Copy full SHA for 68787d7
tests/Unit/MessageQueryTest.php
@@ -67,3 +67,26 @@ function query(?Mailbox $mailbox = null): MessageQuery
67
68
$stream->assertWritten('TAG2 UID STORE 1,2,3 +FLAGS.SILENT (\Deleted)');
69
});
70
+
71
+test('oldest sets fetch order to asc', function () {
72
+ $query = query();
73
74
+ $query->oldest();
75
76
+ expect($query->getFetchOrder())->toBe('asc');
77
+});
78
79
+test('newest sets fetch order to desc', function () {
80
81
82
+ $query->newest();
83
84
+ expect($query->getFetchOrder())->toBe('desc');
85
86
87
+test('oldest and newest return query instance for chaining', function () {
88
89
90
+ expect($query->oldest())->toBe($query);
91
+ expect($query->newest())->toBe($query);
92
0 commit comments