mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Migrated away from PHP Mail Parser to the new WebKlex PHP IMAP Mail Parser this will open the way to support OAUTH2 for Mail servers such as Microsoft 365 and Google Workspaces
This commit is contained in:
38
plugins/php-imap/tests/issues/Issue275Test.php
Normal file
38
plugins/php-imap/tests/issues/Issue275Test.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/*
|
||||
* File: Issue355Test.php
|
||||
* Category: -
|
||||
* Author: M.Goldenbaum
|
||||
* Created: 10.01.23 10:48
|
||||
* Updated: -
|
||||
*
|
||||
* Description:
|
||||
* -
|
||||
*/
|
||||
|
||||
namespace Tests\issues;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Webklex\PHPIMAP\Message;
|
||||
|
||||
class Issue275Test extends TestCase {
|
||||
|
||||
public function testIssueEmail1() {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [__DIR__, "..", "messages", "issue-275.eml"]);
|
||||
$message = Message::fromFile($filename);
|
||||
|
||||
self::assertSame("Testing 123", (string)$message->subject);
|
||||
self::assertSame("Asdf testing123 this is a body", $message->getTextBody());
|
||||
}
|
||||
|
||||
public function testIssueEmail2() {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [__DIR__, "..", "messages", "issue-275-2.eml"]);
|
||||
$message = Message::fromFile($filename);
|
||||
|
||||
$body = "Test\r\n\r\nMed venlig hilsen\r\nMartin Larsen\r\nFeline Holidays A/S\r\nTlf 78 77 04 12";
|
||||
|
||||
self::assertSame("Test 1017", (string)$message->subject);
|
||||
self::assertSame($body, $message->getTextBody());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user