function EmailValidatorTest::testIsValidException
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/Utility/EmailValidatorTest.php \Drupal\Tests\Component\Utility\EmailValidatorTest::testIsValidException()
- 8.9.x core/tests/Drupal/Tests/Component/Utility/EmailValidatorTest.php \Drupal\Tests\Component\Utility\EmailValidatorTest::testIsValidException()
- 11.x 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 36
Class
- EmailValidatorTest
- Tests the EmailValidator utility class.
Namespace
Drupal\Tests\Component\UtilityCode
public function testIsValidException() : void {
$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());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.