Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/Canonicals/Providers/ProtonmailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public function test_get_canonical(): void
['user.name+tag', 'pm.me', 'user.name+tag', 'protonmail.com'],
['user.name', 'proton.me', 'user.name', 'protonmail.com'],
['user.name', 'pm.me', 'user.name', 'protonmail.com'],
// Uppercase sensitivity
['MyMail777', 'proton.me', 'mymail777', 'protonmail.com'],
['MYMAIL777', 'proton.me', 'mymail777', 'protonmail.com'],
['mymail777', 'proton.me', 'mymail777', 'protonmail.com'],
];

foreach ($testCases as [$inputLocal, $inputDomain, $expectedLocal, $expectedDomain]) {
Expand Down
4 changes: 4 additions & 0 deletions tests/EmailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ public function test_get_unique_protonmail_aliases(): void
// Other ProtonMail domains
['user.name+tag@proton.me', 'user.name+tag@protonmail.com'],
['user.name+tag@pm.me', 'user.name+tag@protonmail.com'],
['mymail777@proton.me', 'mymail777@protonmail.com'],
['u.s.e.r.n.a.m.e@protonmail.com', 'u.s.e.r.n.a.m.e@protonmail.com'],
['u.s.e.r.n.a.m.e+tag@protonmail.com', 'u.s.e.r.n.a.m.e+tag@protonmail.com'],
// Edge cases
Expand Down Expand Up @@ -733,6 +734,9 @@ public function test_get_unique_case_sensitivity(): void
['USER.NAME+TAG@PROTONMAIL.COM', 'user.name+tag@protonmail.com'],
['User.Name+Tag@Protonmail.Com', 'user.name+tag@protonmail.com'],
['user.name+tag@Protonmail.com', 'user.name+tag@protonmail.com'],
['MYMAIL777@PROTON.ME', 'mymail777@protonmail.com'],
['MyMail777@Proton.Me', 'mymail777@protonmail.com'],
['mymail777@proton.me', 'mymail777@protonmail.com'],
Comment on lines +737 to +739
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The third entry in this group is all-lowercase (mymail777@proton.me), so it doesn't exercise any case normalisation — it is identical to the test added at line 564 in the regular block. Every other provider's three-entry group in this section follows the pattern UPPERCASE / MixedCase / lowercase-local+mixed-domain (e.g. user.name+tag@Protonmail.com). Using mymail777@Proton.Me as the third variant would stay consistent with that pattern and actually verify domain-case folding.

Suggested change
['MYMAIL777@PROTON.ME', 'mymail777@protonmail.com'],
['MyMail777@Proton.Me', 'mymail777@protonmail.com'],
['mymail777@proton.me', 'mymail777@protonmail.com'],
['MYMAIL777@PROTON.ME', 'mymail777@protonmail.com'],
['MyMail777@Proton.Me', 'mymail777@protonmail.com'],
['mymail777@Proton.Me', 'mymail777@protonmail.com'],

['USER.NAME+TAG@FASTMAIL.COM', 'user.name+tag@fastmail.com'],
['User.Name+Tag@Fastmail.Com', 'user.name+tag@fastmail.com'],
['user.name+tag@Fastmail.com', 'user.name+tag@fastmail.com'],
Expand Down
Loading