function BundleConstraintValidatorTest::testValidation
Same name in other branches
- 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()
- 11.x 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 36
Class
- BundleConstraintValidatorTest
- Tests validation constraints for BundleConstraintValidator.
Namespace
Drupal\KernelTests\Core\EntityCode
public function testValidation() {
// 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.