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:
59
plugins/vendor/webklex/php-imap/tests/fixtures/EmailAddressTest.php
vendored
Normal file
59
plugins/vendor/webklex/php-imap/tests/fixtures/EmailAddressTest.php
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/*
|
||||
* File: EmailAddressTest.php
|
||||
* Category: -
|
||||
* Author: M.Goldenbaum
|
||||
* Created: 09.03.23 02:24
|
||||
* Updated: -
|
||||
*
|
||||
* Description:
|
||||
* -
|
||||
*/
|
||||
|
||||
namespace Tests\fixtures;
|
||||
|
||||
use Webklex\PHPIMAP\Exceptions\AuthFailedException;
|
||||
use Webklex\PHPIMAP\Exceptions\ConnectionFailedException;
|
||||
use Webklex\PHPIMAP\Exceptions\ImapBadRequestException;
|
||||
use Webklex\PHPIMAP\Exceptions\ImapServerErrorException;
|
||||
use Webklex\PHPIMAP\Exceptions\InvalidMessageDateException;
|
||||
use Webklex\PHPIMAP\Exceptions\MaskNotFoundException;
|
||||
use Webklex\PHPIMAP\Exceptions\MessageContentFetchingException;
|
||||
use Webklex\PHPIMAP\Exceptions\ResponseException;
|
||||
use Webklex\PHPIMAP\Exceptions\RuntimeException;
|
||||
|
||||
/**
|
||||
* Class EmailAddressTest
|
||||
*
|
||||
* @package Tests\fixtures
|
||||
*/
|
||||
class EmailAddressTest extends FixtureTestCase {
|
||||
|
||||
/**
|
||||
* Test the fixture email_address.eml
|
||||
*
|
||||
* @return void
|
||||
* @throws \ReflectionException
|
||||
* @throws AuthFailedException
|
||||
* @throws ConnectionFailedException
|
||||
* @throws ImapBadRequestException
|
||||
* @throws ImapServerErrorException
|
||||
* @throws InvalidMessageDateException
|
||||
* @throws MaskNotFoundException
|
||||
* @throws MessageContentFetchingException
|
||||
* @throws ResponseException
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public function testFixture() : void {
|
||||
$message = $this->getFixture("email_address.eml");
|
||||
|
||||
self::assertEquals("", $message->subject);
|
||||
self::assertEquals("123@example.com", $message->message_id);
|
||||
self::assertEquals("Hi\r\nHow are you?", $message->getTextBody());
|
||||
self::assertFalse($message->hasHTMLBody());
|
||||
self::assertFalse($message->date->first());
|
||||
self::assertEquals("no_host", (string)$message->from);
|
||||
self::assertEquals("", $message->to);
|
||||
self::assertEquals("This one: is \"right\" <ding@dong.com>, No-address", (string)$message->cc);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user