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:
52
plugins/php-imap/tests/issues/Issue410Test.php
Normal file
52
plugins/php-imap/tests/issues/Issue410Test.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/*
|
||||
* File: Issue410Test.php
|
||||
* Category: -
|
||||
* Author: M.Goldenbaum
|
||||
* Created: 23.06.23 20:41
|
||||
* Updated: -
|
||||
*
|
||||
* Description:
|
||||
* -
|
||||
*/
|
||||
|
||||
namespace Tests\issues;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Webklex\PHPIMAP\ClientManager;
|
||||
use Webklex\PHPIMAP\Message;
|
||||
|
||||
class Issue410Test extends TestCase {
|
||||
|
||||
public function testIssueEmail() {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [__DIR__, "..", "messages", "issue-410.eml"]);
|
||||
$message = Message::fromFile($filename);
|
||||
|
||||
self::assertSame("☆第132号 「ガーデン&エクステリア」専門店のためのQ&Aサロン 【月刊エクステリア・ワーク】", (string)$message->subject);
|
||||
|
||||
$attachments = $message->getAttachments();
|
||||
|
||||
self::assertSame(1, $attachments->count());
|
||||
|
||||
$attachment = $attachments->first();
|
||||
self::assertSame("☆第132号 「ガーデン&エクステリア」専門店のためのQ&Aサロン 【月刊エクステリア・ワーク】", $attachment->filename);
|
||||
self::assertSame("☆第132号 「ガーデン&エクステリア」専門店のためのQ&Aサロン 【月刊エクステリア・ワーク】", $attachment->name);
|
||||
}
|
||||
|
||||
public function testIssueEmailB() {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [__DIR__, "..", "messages", "issue-410b.eml"]);
|
||||
$message = Message::fromFile($filename);
|
||||
|
||||
self::assertSame("386 - 400021804 - 19., Heiligenstädter Straße 80 - 0819306 - Anfrage Vergabevorschlag", (string)$message->subject);
|
||||
|
||||
$attachments = $message->getAttachments();
|
||||
|
||||
self::assertSame(1, $attachments->count());
|
||||
|
||||
$attachment = $attachments->first();
|
||||
self::assertSame("2021_Mängelliste_0819306.xlsx", $attachment->description);
|
||||
self::assertSame("2021_Mängelliste_0819306.xlsx", $attachment->filename);
|
||||
self::assertSame("2021_Mängelliste_0819306.xlsx", $attachment->name);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user