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:
57
plugins/php-imap/tests/issues/Issue407Test.php
Normal file
57
plugins/php-imap/tests/issues/Issue407Test.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/*
|
||||
* File: Issue407Test.php
|
||||
* Category: Test
|
||||
* Author: M.Goldenbaum
|
||||
* Created: 23.06.23 21:40
|
||||
* Updated: -
|
||||
*
|
||||
* Description:
|
||||
* -
|
||||
*/
|
||||
|
||||
namespace Tests\issues;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Tests\live\LiveMailboxTestCase;
|
||||
use Webklex\PHPIMAP\Folder;
|
||||
use Webklex\PHPIMAP\IMAP;
|
||||
use Webklex\PHPIMAP\Message;
|
||||
|
||||
class Issue407Test extends LiveMailboxTestCase {
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @throws \Webklex\PHPIMAP\Exceptions\AuthFailedException
|
||||
* @throws \Webklex\PHPIMAP\Exceptions\ConnectionFailedException
|
||||
* @throws \Webklex\PHPIMAP\Exceptions\EventNotFoundException
|
||||
* @throws \Webklex\PHPIMAP\Exceptions\FolderFetchingException
|
||||
* @throws \Webklex\PHPIMAP\Exceptions\ImapBadRequestException
|
||||
* @throws \Webklex\PHPIMAP\Exceptions\ImapServerErrorException
|
||||
* @throws \Webklex\PHPIMAP\Exceptions\InvalidMessageDateException
|
||||
* @throws \Webklex\PHPIMAP\Exceptions\MaskNotFoundException
|
||||
* @throws \Webklex\PHPIMAP\Exceptions\MessageContentFetchingException
|
||||
* @throws \Webklex\PHPIMAP\Exceptions\MessageFlagException
|
||||
* @throws \Webklex\PHPIMAP\Exceptions\MessageHeaderFetchingException
|
||||
* @throws \Webklex\PHPIMAP\Exceptions\ResponseException
|
||||
* @throws \Webklex\PHPIMAP\Exceptions\RuntimeException
|
||||
*/
|
||||
public function testIssue() {
|
||||
$folder = $this->getFolder('INBOX');
|
||||
self::assertInstanceOf(Folder::class, $folder);
|
||||
|
||||
$message = $this->appendMessageTemplate($folder, "plain.eml");
|
||||
self::assertInstanceOf(Message::class, $message);
|
||||
|
||||
$message->setFlag("Seen");
|
||||
|
||||
$flags = $this->getClient()->getConnection()->flags($message->uid, IMAP::ST_UID)->validatedData();
|
||||
|
||||
self::assertIsArray($flags);
|
||||
self::assertSame(1, count($flags));
|
||||
self::assertSame("\\Seen", $flags[$message->uid][0]);
|
||||
|
||||
$message->delete();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user