mirror of
https://github.com/itflow-org/itflow
synced 2026-03-01 03:14:52 +00:00
Reintroduce Webklex IMAP for ticket processing as PHP-IMAP is no longer being developed. This is optional for now and considered beta can be found in cron/ticket_email_parser.php
This commit is contained in:
43
plugins/vendor/webklex/php-imap/tests/issues/Issue414Test.php
vendored
Normal file
43
plugins/vendor/webklex/php-imap/tests/issues/Issue414Test.php
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
<?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\Message;
|
||||
|
||||
class Issue414Test extends TestCase {
|
||||
|
||||
public function testIssueEmail() {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [__DIR__, "..", "messages", "issue-414.eml"]);
|
||||
$message = Message::fromFile($filename);
|
||||
|
||||
self::assertSame("Test", (string)$message->subject);
|
||||
|
||||
$attachments = $message->getAttachments();
|
||||
|
||||
self::assertSame(2, $attachments->count());
|
||||
|
||||
$attachment = $attachments->first();
|
||||
self::assertEmpty($attachment->description);
|
||||
self::assertSame("exampleMyFile.txt", $attachment->filename);
|
||||
self::assertSame("exampleMyFile.txt", $attachment->name);
|
||||
self::assertSame("be62f7e6", $attachment->id);
|
||||
|
||||
$attachment = $attachments->last();
|
||||
self::assertEmpty($attachment->description);
|
||||
self::assertSame("phpfoo", $attachment->filename);
|
||||
self::assertSame("phpfoo", $attachment->name);
|
||||
self::assertSame("12e1d38b", $attachment->hash);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user