itflow/plugins/php-imap/tests/issues/Issue410Test.php

52 lines
1.9 KiB
PHP
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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);
}
}