Debian Codegraph @

lib/3rdParty/composer/webklex/php-imap/tests/issues/Issue407Test.php

raw symbols SCIP
1 <?php
2 /*
3 * File: Issue407Test.php
4 * Category: Test
5 * Author: M.Goldenbaum
6 * Created: 23.06.23 21:40
7 * Updated: -
8 *
9 * Description:
10 * -
11 */
12
13 namespace Tests\issues;
14
15 use PHPUnit\Framework\TestCase;
16 use Tests\live\LiveMailboxTestCase;
17 use Webklex\PHPIMAP\Folder;
18 use Webklex\PHPIMAP\IMAP;
19 use Webklex\PHPIMAP\Message;
20
21 class Issue407Test extends LiveMailboxTestCase {
22
23 /**
24 * @return void
25 * @throws \Webklex\PHPIMAP\Exceptions\AuthFailedException
26 * @throws \Webklex\PHPIMAP\Exceptions\ConnectionFailedException
27 * @throws \Webklex\PHPIMAP\Exceptions\EventNotFoundException
28 * @throws \Webklex\PHPIMAP\Exceptions\FolderFetchingException
29 * @throws \Webklex\PHPIMAP\Exceptions\ImapBadRequestException
30 * @throws \Webklex\PHPIMAP\Exceptions\ImapServerErrorException
31 * @throws \Webklex\PHPIMAP\Exceptions\InvalidMessageDateException
32 * @throws \Webklex\PHPIMAP\Exceptions\MaskNotFoundException
33 * @throws \Webklex\PHPIMAP\Exceptions\MessageContentFetchingException
34 * @throws \Webklex\PHPIMAP\Exceptions\MessageFlagException
35 * @throws \Webklex\PHPIMAP\Exceptions\MessageHeaderFetchingException
36 * @throws \Webklex\PHPIMAP\Exceptions\ResponseException
37 * @throws \Webklex\PHPIMAP\Exceptions\RuntimeException
38 */
39 public function testIssue() {
40 $folder = $this->getFolder('INBOX');
41 self::assertInstanceOf(Folder::class, $folder);
42
43 $message = $this->appendMessageTemplate($folder, "plain.eml");
44 self::assertInstanceOf(Message::class, $message);
45
46 $message->setFlag("Seen");
47
48 $flags = $this->getClient()->getConnection()->flags($message->uid, IMAP::ST_UID)->validatedData();
49
50 self::assertIsArray($flags);
51 self::assertSame(1, count($flags));
52 self::assertSame("\\Seen", $flags[$message->uid][0]);
53
54 $message->delete();
55 }
56
57 }