public function EmailValidatorTest::testIsValidException in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Utility/EmailValidatorTest.php \Drupal\Tests\Component\Utility\EmailValidatorTest::testIsValidException()
- 9 core/tests/Drupal/Tests/Component/Utility/EmailValidatorTest.php \Drupal\Tests\Component\Utility\EmailValidatorTest::testIsValidException()
@covers ::isValid
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ EmailValidatorTest.php, line 34
Class
- EmailValidatorTest
- Tests the EmailValidator utility class.
Namespace
Drupal\Tests\Component\UtilityCode
public function testIsValidException() {
$validator = new EmailValidator();
$this
->expectException(\BadMethodCallException::class);
$this
->expectExceptionMessage('Calling \\Drupal\\Component\\Utility\\EmailValidator::isValid() with the second argument is not supported. See https://www.drupal.org/node/2997196');
$validator
->isValid('example@example.com', new RFCValidation());
}