File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 11<?php
22
33use DirectoryTree \ImapEngine \Attachment ;
4+ use DirectoryTree \ImapEngine \Enums \ImapFlag ;
45use DirectoryTree \ImapEngine \Exceptions \RuntimeException ;
56use DirectoryTree \ImapEngine \FileMessage ;
67
1011 $ message ->parse ();
1112})->throws (RuntimeException::class);
1213
14+ test ('it throws exception when uid is called ' , function () {
15+ $ message = new FileMessage ('test ' );
16+
17+ $ message ->uid ();
18+ })->throws (BadMethodCallException::class);
19+
20+ test ('it throws exception when flag is called ' , function () {
21+ $ message = new FileMessage ('test ' );
22+
23+ $ message ->flag (ImapFlag::Seen, '+ ' );
24+ })->throws (BadMethodCallException::class);
25+
26+ test ('it returns empty flags ' , function () {
27+ $ message = new FileMessage ('test ' );
28+
29+ expect ($ message ->flags ())->toBe ([]);
30+ });
31+
1332test ('it can parse a standard EML message and read basic headers ' , function () {
1433 $ contents = <<<'EOT'
1534 From: "John Doe" <[email protected] >
You can’t perform that action at this time.
0 commit comments