An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
<?php
it('normalizes plus and dotted email identity variants', function () {
expect(normalize_email_identity('[email protected]'))->toBe('[email protected]');
expect(normalize_email_identity('[email protected]'))->toBe('[email protected]');
});
it('preserves dots and plus suffixes for ordinary email providers', function () {
expect(normalize_email_identity(' [email protected] '))->toBe('[email protected]');
});
it('returns null for blank or malformed email identities', function (?string $email) {
expect(normalize_email_identity($email))->toBeNull();
})->with([
null,
'',
'not-an-email',
'@example.com',
'local@',
]);