public function BundleConstraintValidatorTest::testValidation in Drupal 8
Same name and namespace in other branches
- 9 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 33
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');
}