function LinkNotExistingInternalConstraintValidatorTest::testValidateWithMalformedUri
Same name in other branches
- 9 core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidatorTest.php \Drupal\Tests\link\Unit\Plugin\Validation\Constraint\LinkNotExistingInternalConstraintValidatorTest::testValidateWithMalformedUri()
- 8.9.x core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidatorTest.php \Drupal\Tests\link\Unit\Plugin\Validation\Constraint\LinkNotExistingInternalConstraintValidatorTest::testValidateWithMalformedUri()
- 10 core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidatorTest.php \Drupal\Tests\link\Unit\Plugin\Validation\Constraint\LinkNotExistingInternalConstraintValidatorTest::testValidateWithMalformedUri()
@covers ::validate
See also
\Drupal\Core\Url::fromUri
File
-
core/
modules/ link/ tests/ src/ Unit/ Plugin/ Validation/ Constraint/ LinkNotExistingInternalConstraintValidatorTest.php, line 96
Class
- LinkNotExistingInternalConstraintValidatorTest
- @coversDefaultClass \Drupal\link\Plugin\Validation\Constraint\LinkNotExistingInternalConstraintValidator @group Link
Namespace
Drupal\Tests\link\Unit\Plugin\Validation\ConstraintCode
public function testValidateWithMalformedUri() : void {
$link = $this->createMock(LinkItemInterface::class);
$link->expects($this->any())
->method('getUrl')
->willThrowException(new \InvalidArgumentException());
$context = $this->createMock(ExecutionContextInterface::class);
$context->expects($this->never())
->method('addViolation');
$this->validate($link, $context);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.