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 6a615b6 commit 3c66cd3Copy full SHA for 3c66cd3
tests/Integration/MessagesTest.php
@@ -55,6 +55,18 @@ function folder(): Folder
55
expect($folder->messages()->first()->uid())->toBe($uid);
56
});
57
58
+test('first or fail', function () {
59
+ $folder = folder();
60
+
61
+ expect(fn () => $folder->messages()->firstOrFail())->toThrow(ItemNotFoundException::class);
62
63
+ $uid = $folder->messages()->append(
64
+ new DraftMessage(from: '[email protected]', text: 'hello world'),
65
+ );
66
67
+ expect($folder->messages()->firstOrFail()->uid())->toBe($uid);
68
+});
69
70
test('find', function () {
71
$folder = folder();
72
0 commit comments