function BundleConstraintValidatorTest::testValidation
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php \Drupal\KernelTests\Core\Entity\BundleConstraintValidatorTest::testValidation()
- 8.9.x core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php \Drupal\KernelTests\Core\Entity\BundleConstraintValidatorTest::testValidation()
- 10 core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php \Drupal\KernelTests\Core\Entity\BundleConstraintValidatorTest::testValidation()
Tests bundle constraint validation.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Entity/ BundleConstraintValidatorTest.php, line 41
Class
- BundleConstraintValidatorTest
- Tests validation constraints for BundleConstraintValidator.
Namespace
Drupal\KernelTests\Core\EntityCode
public function testValidation() : void {
// Test with multiple values.
$this->assertValidation([
'foo',
'bar',
]);
// Test with a single string value as well.
$this->assertValidation('foo');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.