![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/framework/Validator/Test/Unit/ |
<?php declare(strict_types=1); /** * Integration test for \Magento\Framework\Validator\Factory * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Framework\Validator\Test\Unit; use Magento\Framework\Validator\EmailAddress; use PHPUnit\Framework\TestCase; class EmailAddressTest extends TestCase { /** * Test that the validator ignores TLD validation by default */ public function testDefaultValidateIgnoresTLD() { /** @var EmailAddress $emailAddress */ $emailAddress = new EmailAddress(); $this->assertTrue($emailAddress->isValid("[email protected]")); } /** * Test that the TLD validation can be enabled */ public function testCanValidateTLD() { /** @var EmailAddress $emailAddress */ $emailAddress = new EmailAddress(); $emailAddress->setValidateTld(true); $this->assertFalse($emailAddress->isValid("[email protected]")); } }