Debian Codegraph @

lib/3rdParty/composer/webklex/php-imap/tests/fixtures/MultipartWithoutBodyTest.php

raw symbols SCIP
1 <?php
2 /*
3 * File: MultipartWithoutBodyTest.php
4 * Category: -
5 * Author: M.Goldenbaum
6 * Created: 09.03.23 02:24
7 * Updated: -
8 *
9 * Description:
10 * -
11 */
12
13 namespace Tests\fixtures;
14
15 /**
16 * Class MultipartWithoutBodyTest
17 *
18 * @package Tests\fixtures
19 */
20 class MultipartWithoutBodyTest extends FixtureTestCase {
21
22 /**
23 * Test the fixture multipart_without_body.eml
24 *
25 * @return void
26 */
27 public function testFixture() : void {
28 $message = $this->getFixture("multipart_without_body.eml");
29
30 self::assertEquals("This mail will not contain a body", $message->subject);
31 self::assertEquals("This mail will not contain a body", $message->getTextBody());
32 self::assertEquals("d76dfb1ff3231e3efe1675c971ce73f722b906cc049d328db0d255f8d3f65568", hash("sha256", $message->getHTMLBody()));
33 self::assertEquals("2023-03-11 08:24:31", $message->date->first()->setTimezone('UTC')->format("Y-m-d H:i:s"));
34 self::assertEquals("Foo Bülow Bar <[email protected]>", $message->from);
35 self::assertEquals("some one <[email protected]>", $message->to);
36 self::assertEquals([
37 0 => 'from AS8PR02MB6805.eurprd02.prod.outlook.com (2603:10a6:20b:252::8) by PA4PR02MB7071.eurprd02.prod.outlook.com with HTTPS; Sat, 11 Mar 2023 08:24:33 +0000',
38 1 => 'from omef0ahNgeoJu.eurprd02.prod.outlook.com (2603:10a6:10:33c::12) by AS8PR02MB6805.eurprd02.prod.outlook.com (2603:10a6:20b:252::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19; Sat, 11 Mar 2023 08:24:31 +0000',
39 2 => 'from omef0ahNgeoJu.eurprd02.prod.outlook.com ([fe80::38c0:9c40:7fc6:93a7]) by omef0ahNgeoJu.eurprd02.prod.outlook.com ([fe80::38c0:9c40:7fc6:93a7%7]) with mapi id 15.20.6178.019; Sat, 11 Mar 2023 08:24:31 +0000',
40 ], $message->received->all());
41 self::assertEquals("This mail will not contain a body", $message->thread_topic);
42 self::assertEquals("AdlT8uVmpHPvImbCRM6E9LODIvAcQA==", $message->thread_index);
43 self::assertEquals("omef0ahNgeoJuEB51C568ED2227A2DAABB5BB9@omef0ahNgeoJu.eurprd02.prod.outlook.com", $message->message_id);
44 self::assertEquals("da-DK, en-US", $message->accept_language);
45 self::assertEquals("en-US", $message->content_language);
46 self::assertEquals("Internal", $message->x_ms_exchange_organization_authAs);
47 self::assertEquals("04", $message->x_ms_exchange_organization_authMechanism);
48 self::assertEquals("omef0ahNgeoJu.eurprd02.prod.outlook.com", $message->x_ms_exchange_organization_authSource);
49 self::assertEquals("", $message->x_ms_Has_Attach);
50 self::assertEquals("aa546a02-2b7a-4fb1-7fd4-08db220a09f1", $message->x_ms_exchange_organization_Network_Message_Id);
51 self::assertEquals("-1", $message->x_ms_exchange_organization_SCL);
52 self::assertEquals("", $message->x_ms_TNEF_Correlator);
53 self::assertEquals("0", $message->x_ms_exchange_organization_RecordReviewCfmType);
54 self::assertEquals("Email", $message->x_ms_publictraffictype);
55 self::assertEquals("ucf:0;jmr:0;auth:0;dest:I;ENG:(910001)(944506478)(944626604)(920097)(425001)(930097);", $message->X_Microsoft_Antispam_Mailbox_Delivery->first());
56 self::assertEquals("0712b5fe22cf6e75fa220501c1a6715a61098983df9e69bad4000c07531c1295", hash("sha256", $message->X_Microsoft_Antispam_Message_Info));
57 self::assertEquals("multipart/alternative", $message->Content_Type->last());
58 self::assertEquals("1.0", $message->mime_version);
59
60 self::assertCount(0, $message->getAttachments());
61 }
62 }