1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 11:30:55 +01:00
phorge-phorge/externals/mimemailparser/__init.php
Valerio Bozzolan 9d3e258853 Add first unit test for mimemailparser headers
Summary:
Uploaded an example email with a lot of accents called 'test_accents.mbox' and
expected headers in the file 'test_accents.headers.txt'.

Better than nothing.

This change also includes a minor refactor in the library loading.

Ref T15960

Test Plan:
Manually run the new unit test and see green lights:

    arc unit src/applications/metamta/externals/__tests__/PhabricatorExternalMimeMailParserTestCase.php

Double-check that the new class is already recorded:

    arc liberate

Just as extra care, re-apply the same test plan of:

D25839

So, for example, run this, and see no exceptions:

    ./scripts/mail/mail_handler.php < src/applications/metamta/externals/__tests__/data/test_accents.mbox

Reviewers: aklapper, taavi, O1 Blessed Committers

Reviewed By: aklapper, O1 Blessed Committers

Subscribers: tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15960

Differential Revision: https://we.phorge.it/D25844
2024-12-06 13:12:54 +01:00

11 lines
384 B
PHP

<?php
$root = __DIR__;
require_once $root.'/Contracts/CharsetManager.php';
require_once $root.'/Contracts/Middleware.php';
require_once $root.'/Parser.php';
require_once $root.'/Charset.php';
require_once $root.'/Attachment.php';
require_once $root.'/Exception.php';
require_once $root.'/Middleware.php';
require_once $root.'/MiddlewareStack.php';
require_once $root.'/MimePart.php';