Skip to content

Commit d033de9

Browse files
committed
Add test
1 parent ff39a48 commit d033de9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/ImapManagerTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,18 @@
5252
expect(fn () => $this->manager->mailbox('undefined'))
5353
->toThrow(InvalidArgumentException::class, 'Mailbox [undefined] is not defined.');
5454
});
55+
56+
it('registers and retrieves a new mailbox', function () {
57+
$this->manager->register('custom', [
58+
'host' => 'imap.custom.com',
59+
'port' => 993,
60+
'username' => '[email protected]',
61+
'password' => 'password',
62+
'encryption' => 'ssl',
63+
]);
64+
65+
$mailbox = $this->manager->mailbox('custom');
66+
67+
expect($mailbox)->toBeInstanceOf(MailboxInterface::class);
68+
expect($mailbox)->toBeInstanceOf(Mailbox::class);
69+
});

0 commit comments

Comments
 (0)