Debian Codegraph @

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

raw symbols SCIP
1 <?php
2 /*
3 * File: Issue462Test.php
4 * Category: -
5 * Author: M.Goldenbaum
6 * Created: 23.06.23 20:41
7 * Updated: -
8 *
9 * Description:
10 * -
11 */
12
13 namespace Tests\issues;
14
15 use Tests\fixtures\FixtureTestCase;
16 use Webklex\PHPIMAP\Config;
17 use Webklex\PHPIMAP\Exceptions\AuthFailedException;
18 use Webklex\PHPIMAP\Exceptions\ConnectionFailedException;
19 use Webklex\PHPIMAP\Exceptions\ImapBadRequestException;
20 use Webklex\PHPIMAP\Exceptions\ImapServerErrorException;
21 use Webklex\PHPIMAP\Exceptions\InvalidMessageDateException;
22 use Webklex\PHPIMAP\Exceptions\MaskNotFoundException;
23 use Webklex\PHPIMAP\Exceptions\MessageContentFetchingException;
24 use Webklex\PHPIMAP\Exceptions\ResponseException;
25 use Webklex\PHPIMAP\Exceptions\RuntimeException;
26
27 class Issue462Test extends FixtureTestCase {
28
29 /**
30 * @throws RuntimeException
31 * @throws MessageContentFetchingException
32 * @throws ResponseException
33 * @throws ImapBadRequestException
34 * @throws InvalidMessageDateException
35 * @throws ConnectionFailedException
36 * @throws \ReflectionException
37 * @throws ImapServerErrorException
38 * @throws AuthFailedException
39 * @throws MaskNotFoundException
40 */
41 public function testIssueEmail() {
42 $config = Config::make();
43 $config->set('options.rfc822', false);
44 $message = $this->getFixture("issue-462.eml", $config);
45 self::assertSame("Undeliverable: Some subject", (string)$message->subject);
46 self::assertSame("postmaster@ <sending_domain.tld postmaster@sending_domain.tld>", (string)$message->from->first());
47 }
48 }