public static function ConfigValidation::validateCatCount in Drupal 8
Same name and namespace in other branches
- 9 core/modules/config/tests/config_test/src/ConfigValidation.php \Drupal\config_test\ConfigValidation::validateCatCount()
Validates a number.
Parameters
int $count: The integer to validate.
\Symfony\Component\Validator\Context\ExecutionContextInterface $context: The validation execution context.
File
- core/
modules/ config/ tests/ config_test/ src/ ConfigValidation.php, line 48
Class
- ConfigValidation
- Provides a collection of validation callbacks for testing purposes.
Namespace
Drupal\config_testCode
public static function validateCatCount($count, ExecutionContextInterface $context) {
if ($count <= 1) {
$context
->addViolation('no enough cats');
}
}