Files
myep-team/tests/Entity/ContactTest.php
T

23 lines
573 B
PHP

<?php
declare(strict_types=1);
namespace App\Tests\Entity;
use App\Entity\Contact;
use PHPUnit\Framework\TestCase;
class ContactTest extends TestCase
{
/**
* Office contacts are normalized the same way User::setEmail() normalizes, so that every
* stored address has one shape regardless of which form wrote it.
*/
public function testSetEmailNormalizesCaseAndSurroundingWhitespace(): void
{
$contact = (new Contact())->setEmail(' [email protected] ');
$this->assertSame('[email protected]', $contact->getEmail());
}
}