File
- drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php, line 71
Class
- CallbackValidatorTest
Namespace
Symfony\Component\Validator\Tests\Constraints
Code
public function testCallbackSingleMethod() {
$object = new CallbackValidatorTest_Object();
$constraint = new Callback(array(
'validateOne',
));
$this->context
->expects($this
->once())
->method('addViolation')
->with('My message', array(
'{{ value }}' => 'foobar',
));
$this->validator
->validate($object, $constraint);
}