HomePhorge

Add first unit test for mimemailparser headers

Description

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

Details

Provenance
Valerio BozzolanAuthored on Dec 6 2024, 4:12 AM
themackabuPushed on Tue, Mar 25, 8:07 PM
Parents
rP9c73d62c4466: Rewrite regex for project names to be not prone to catastrophic backtracking
Branches
Unknown
Tags
Unknown

Event Timeline