function LinkTitleRequiredConstraintValidatorTest::testUnexpectedValue
Tests validating a value that isn't a LinkItemInterface.
File
-
core/
modules/ link/ tests/ src/ Unit/ Plugin/ Validation/ Constraint/ LinkTitleRequiredConstraintValidatorTest.php, line 32
Class
Namespace
Drupal\Tests\link\Unit\Plugin\Validation\ConstraintCode
public function testUnexpectedValue() : void {
$this->expectException(UnexpectedValueException::class);
$context = $this->createMock(ExecutionContextInterface::class);
$this->doValidate('bad value', $context);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.