Skip to content

Commit 2af8c99

Browse files
committed
Remove unnecessary feedRaw
1 parent 308093c commit 2af8c99

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

tests/Unit/Connection/ImapParserTest.php

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,12 @@
273273
$stream->open();
274274

275275
// Simulating BODY[TEXT] before BODY[HEADER]
276-
$stream->feedRaw([
277-
"* 1 FETCH (UID 123 FLAGS (\\Seen) BODY[TEXT] {13}\r\n",
278-
"Hello World\r\n",
279-
" BODY[HEADER] {23}\r\n",
280-
"Subject: Test Message\r\n",
281-
")\r\n",
276+
$stream->feed([
277+
'* 1 FETCH (UID 123 FLAGS (\\Seen) BODY[TEXT] {13}',
278+
'Hello World',
279+
' BODY[HEADER] {23}',
280+
'Subject: Test Message',
281+
')',
282282
]);
283283

284284
$tokenizer = new ImapTokenizer($stream);
@@ -316,12 +316,12 @@
316316
$stream->open();
317317

318318
// Simulating BODY[HEADER] before BODY[TEXT]
319-
$stream->feedRaw([
320-
"* 1 FETCH (UID 456 FLAGS (\\Seen) BODY[HEADER] {26}\r\n",
321-
"From: [email protected]\r\n",
322-
" BODY[TEXT] {20}\r\n",
323-
"Message body here.\r\n",
324-
")\r\n",
319+
$stream->feed([
320+
'* 1 FETCH (UID 456 FLAGS (\\Seen) BODY[HEADER] {26}',
321+
322+
' BODY[TEXT] {20}',
323+
'Message body here.',
324+
')',
325325
]);
326326

327327
$tokenizer = new ImapTokenizer($stream);
@@ -361,12 +361,13 @@
361361
$stream->open();
362362

363363
// Full FETCH response with all common fields
364-
$stream->feedRaw([
365-
"* 1 FETCH (UID 789 RFC822.SIZE 1024 FLAGS (\\Seen \\Flagged) BODY[TEXT] {25}\r\n",
366-
"This is the email body.\r\n",
367-
" BODY[HEADER] {46}\r\n",
368-
"To: [email protected]\r\nSubject: Re: Test\r\n",
369-
")\r\n",
364+
$stream->feed([
365+
'* 1 FETCH (UID 789 RFC822.SIZE 1024 FLAGS (\\Seen \\Flagged) BODY[TEXT] {25}',
366+
'This is the email body.',
367+
' BODY[HEADER] {46}',
368+
369+
'Subject: Re: Test',
370+
')',
370371
]);
371372

372373
$tokenizer = new ImapTokenizer($stream);

0 commit comments

Comments
 (0)